12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- define([], function () {
- var ContentUtil = function () {
- function ContentUtil() {
- _classCallCheck(this, ContentUtil);
- }
-
- ContentUtil.getPageContent = function getPageContent(content) {
- var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'page';
- var pageContent = null;
- while (content) {
- if (type && content.getType() === type) {
- pageContent = content;
- }
- content = content.getContainer();
- }
- return pageContent;
- };
- return ContentUtil;
- }();
- return ContentUtil;
- });
|