18 require_once SQ_CORE_PACKAGE_PATH.
'/bodycopy/bodycopy/bodycopy.inc';
39 public $layout_keywords = Array();
50 $this->_ser_attrs = TRUE;
51 parent::__construct($assetid);
67 SQ_LINK_TYPE_1 => Array(
73 SQ_LINK_TYPE_2 => Array(
79 SQ_LINK_TYPE_3 => Array(
85 SQ_LINK_NOTICE => Array(
139 if (empty($this->layout_keywords)) {
142 if (empty($keywords))
return Array();
145 $this->layout_keywords[
'screens'] = Array();
146 $this->layout_keywords[
'entire_screens'] = Array();
147 $this->layout_keywords[
'custom'] = Array();
148 $this->layout_keywords[
'layout'] = Array();
154 return $this->layout_keywords;
170 foreach ($keywords as $keyword) {
171 if (FALSE !== (strpos($keyword,
'-'))) {
172 list($screen, $tag) = explode(
'-', $keyword);
173 $screen = strtolower($screen);
174 $tag = strtolower($tag);
176 if ($screen ==
'__custom') {
179 $return_array[
'custom'][] = $tag;
186 if (strtoupper($type) !=
'S' && strtoupper($type) !=
'F') {
189 $tag = substr($tag, 2);
191 if (!isset($return_array[
'screens'][$screen])) {
192 $return_array[
'screens'][$screen] = Array();
196 if (strtoupper($type) ==
'F') {
197 if (!isset($return_array[
'screens'][$screen][
'fields'])) {
198 $return_array[
'screens'][$screen][
'fields'] = Array();
200 if (!in_array($tag, $return_array[
'screens'][$screen][
'fields'])) {
201 $return_array[
'screens'][$screen][
'fields'][$tag] = $keyword;
205 if (!isset($return_array[
'screens'][$screen][
'sections'])) {
206 $return_array[
'screens'][$screen][
'sections'] = Array();
208 if (!in_array($tag, $return_array[
'screens'][$screen][
'sections'])) {
209 $return_array[
'screens'][$screen][
'sections'][$tag] = $keyword;
214 if (!in_array($screen, $return_array[
'entire_screens'])) {
215 $return_array[
'entire_screens'][$screen] = $keyword;
221 $return_array[
'layout'][] = $keyword;
225 return $return_array;
242 if (!isset($vars[
'keywords']))
return;
244 $parents = $GLOBALS[
'SQ_SYSTEM']->am->getParents($broadcaster->id,
'layout', TRUE);
245 if (!empty($parents) && isset($parents[$this->
id])) {
246 $vars[
'keywords'][
'screen_menu'] =
'Screen Menu';
247 $vars[
'keywords'][
'context_switcher'] =
'Context Switcher';
248 $vars[
'keywords'][
'commit_button'] =
'Commit Button';
249 $vars[
'keywords'][
'commit_button_clean'] =
'Commit Button (without formatting)';
250 $vars[
'keywords'][
'release_locks_button'] =
'Release-locks button';
251 $vars[
'keywords'][
'xx-'] =
'All of screen xx';
252 $vars[
'keywords'][
'xx-S_yy'] =
'All of section yy of screen xx';
253 $vars[
'keywords'][
'xx-F_zz'] =
'Field zz of screen xx';
254 $vars[
'keywords'][
'__custom-pp'] =
'Custom limbo keyword pp of the current asset type';