18 require_once SQ_CORE_PACKAGE_PATH.
'/bodycopy/bodycopy/bodycopy.inc';
19 require_once SQ_FUDGE_PATH.
'/general/text.inc';
44 parent::__construct($assetid);
58 $page_links = parent::_getAllowedLinks();
59 $page_links[SQ_LINK_TYPE_1][
'page'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
60 $page_links[SQ_LINK_TYPE_1][
'file'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
61 $page_links[SQ_LINK_TYPE_2][
'container'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
62 $page_links[SQ_LINK_TYPE_2][
'page'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
63 $page_links[SQ_LINK_TYPE_2][
'file'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
64 $page_links[SQ_LINK_NOTICE][
'asset'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
82 if (!parent::_createAdditional($link))
return FALSE;
84 require_once SQ_INCLUDE_PATH.
'/general_occasional.inc';
85 $multi_page = $link[
'asset'];
87 $new_page_number = strval($multi_page->getNumberOfPages());
104 public function _getName($short_name=FALSE, $contextid=NULL)
107 if ($contextid === NULL) {
108 $contextid = $GLOBALS[
'SQ_SYSTEM']->getContextId();
112 $values = $GLOBALS[
'SQ_SYSTEM']->am->getAttributeValuesByName(
'name', $this->
type(), Array($this->
id), $contextid);
113 if (empty($values) === TRUE) {
114 return parent::_getName($short_name, $contextid);
116 return $values[$this->id];
132 $parent->printPage($this);
145 if ($this->
id !=
'0') {
146 $parents = $GLOBALS[
'SQ_SYSTEM']->am->getParents($this->
id,
'page_multiple_page');
147 if (!empty($parents)) {
148 return current(array_keys($parents));
165 if ($multi_id !=
'0') {
166 return $GLOBALS[
'SQ_SYSTEM']->am->getAsset($multi_id);
182 return parent::getRawBodycopyContent();
197 $content = ob_get_contents();
213 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'page_multiple_page');
215 return $parent->getAvailableKeywords();
232 if (preg_match(
'|^asset_metadata_|', $value)) {
233 $replacement =
'%'.$value.
'%';
235 $replacement = parent::getKeywordReplacement($value);
238 if ($replacement ==
'%'.$value.
'%') {
240 $replacement = $parent->getKeywordReplacement($value);
259 if (!is_array($keywords) || empty($keywords)) {
262 $print_commit_button = FALSE;
264 $replacements = Array();
265 foreach ($keywords as $keyword) {
269 if (!$invoke_backend) {
270 $o = $GLOBALS[
'SQ_SYSTEM']->backend->out ;
272 require_once SQ_INCLUDE_PATH.
'/backend_outputter.inc';
276 if ($edit->paintBodycopy($this, $o, $this->getPrefix())) {
277 $print_commit_button = TRUE;
279 $replacements[$keyword] = ob_get_contents();
284 $replacements[$keyword] =
'';
289 return Array(
'replacements' => $replacements,
'print_commit_button' => $print_commit_button);
305 if (!is_array($keywords) || empty($keywords)) {
309 foreach ($keywords as $keyword) {
313 $edit->processBodycopy($this, $GLOBALS[
'SQ_SYSTEM']->backend->out, $this->getPrefix());