array (
'criteria' =>
array (
'name' => 'fred',
),
'object' =>
array (
'name' => 'fred',
'path' => '{core_path}components/fred/',
'assets_path' => '{assets_path}components/fred/',
),
),
'fc273ac310c52306b978d37bea7648ce' =>
array (
'criteria' =>
array (
'key' => 'fred.launcher_position',
),
'object' =>
array (
'key' => 'fred.launcher_position',
'value' => 'bottom_left',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => NULL,
),
),
'd88e7ea6d8d85302c058041666b66871' =>
array (
'criteria' =>
array (
'key' => 'fred.icon_editor',
),
'object' =>
array (
'key' => 'fred.icon_editor',
'value' => 'IconEditor',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => NULL,
),
),
'c34523a31af71ace4bad2ba255604b45' =>
array (
'criteria' =>
array (
'key' => 'fred.image_editor',
),
'object' =>
array (
'key' => 'fred.image_editor',
'value' => 'ImageEditor',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => NULL,
),
),
'7631e9928799387322a2102d0cb574d5' =>
array (
'criteria' =>
array (
'key' => 'fred.rte',
),
'object' =>
array (
'key' => 'fred.rte',
'value' => 'TinyMCE',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => '2018-11-29 05:47:02',
),
),
'434d64fb137569682a0495d1c1e3a73b' =>
array (
'criteria' =>
array (
'key' => 'fred.element_group_sort',
),
'object' =>
array (
'key' => 'fred.element_group_sort',
'value' => 'name',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => NULL,
),
),
'00f17ded51254b836d514514a56a017a' =>
array (
'criteria' =>
array (
'key' => 'fred.element_sort',
),
'object' =>
array (
'key' => 'fred.element_sort',
'value' => 'name',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => NULL,
),
),
'2ba0d04599604971601dfe319808e233' =>
array (
'criteria' =>
array (
'key' => 'fred.blueprint_category_sort',
),
'object' =>
array (
'key' => 'fred.blueprint_category_sort',
'value' => 'name',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => NULL,
),
),
'090664b763d26d136ab538ff3f0b97cb' =>
array (
'criteria' =>
array (
'key' => 'fred.blueprint_sort',
),
'object' =>
array (
'key' => 'fred.blueprint_sort',
'value' => 'name',
'xtype' => 'textfield',
'namespace' => 'fred',
'area' => 'default',
'editedon' => NULL,
),
),
'8b35f2ca9134305a444a28327f0e4c85' =>
array (
'criteria' =>
array (
'key' => 'fred.secret',
),
'object' =>
array (
'key' => 'fred.secret',
'value' => '7d4cb8c8e6d4513332b7168a86845062927b701796e404ccb0545799b5f81287e78238a1',
'xtype' => 'text-password',
'namespace' => 'fred',
'area' => 'default',
'editedon' => '2018-11-29 00:01:43',
),
),
'ff72aa76d1721def64610be2496ad42f' =>
array (
'criteria' =>
array (
'category' => 'Fred',
),
'object' =>
array (
'id' => 27,
'parent' => 0,
'category' => 'Fred',
'rank' => 0,
),
),
'd326a485440e71a2c3479466cf4ad432' =>
array (
'criteria' =>
array (
'name' => 'Fred',
),
'object' =>
array (
'id' => 14,
'source' => 0,
'property_preprocess' => 0,
'name' => 'Fred',
'description' => '',
'editor_type' => 0,
'category' => 27,
'cache_type' => 0,
'plugincode' => '/*
* This file is part of the Fred package.
*
* Copyright (c) MODX, LLC
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$corePath = $modx->getOption(\'fred.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/fred/\');
/** @var Fred $fred */
$fred = $modx->getService(
\'fred\',
\'Fred\',
$corePath . \'model/fred/\',
array(
\'core_path\' => $corePath
)
);
switch ($modx->event->name) {
case \'OnDocFormPrerender\':
if(!empty($resource) && !empty($fred->getTheme($resource->template))) {
//Disable ContentBlocks
$isContentBlocks = $resource->getProperty(\'_isContentBlocks\', \'contentblocks\', null);
if($isContentBlocks !== false){
$resource->setProperty(\'_isContentBlocks\', false, \'contentblocks\');
$resource->save();
}
$data = $resource->getProperty(\'data\', \'fred\');
$fingerprint = !empty($data[\'fingerprint\']) ? $data[\'fingerprint\'] : \'\';
//Load Open in Fred button
$modx->lexicon->load(\'fred:default\');
$modx->controller->addLexiconTopic(\'fred:default\');
$modx->controller->addHtml("
");
}
break;
case \'OnLoadWebDocument\':
$theme = $fred->getTheme($modx->resource->template);
if (!empty($theme)) {
$themeUri = $theme->getThemeFolderUri();
$modx->setPlaceholder(\'+fred.theme_dir\', $themeUri);
$modx->setOption(\'fred.theme_dir\', $themeUri);
}
break;
case \'OnWebPagePrerender\':
$theme = $fred->getTheme($modx->resource->template);
if (!empty($theme)) {
if (!$modx->user) return;
if (!($modx->user->hasSessionContext(\'mgr\') || $modx->user->hasSessionContext($modx->resource->context_key))) return;
if (!$modx->hasPermission(\'fred\')) return;
$modx->lexicon->load(\'fred:fe\');
$fredMode = 1;
if (isset($_SESSION[\'fred\'])) {
$fredMode = intval($_SESSION[\'fred\']);
}
if (isset($_GET[\'fred\'])) {
$fredMode = intval($_GET[\'fred\']);
}
if ($fredMode === 4) {
$fredMode = 0;
$_SESSION[\'fred\'] = 0;
}
if ($fredMode === 1) {
$_SESSION[\'fred\'] = 1;
}
$get = $_GET;
unset($get[$modx->getOption(\'request_param_alias\', [], \'q\')]);
if ($fredMode === 0) {
$button = "makeUrl($modx->resource->id, \'\', array_merge($get, [\'fred\' => 1]) , \'abs\')) . "\\" title=\\"" . $modx->lexicon(\'fred.fe.turn_on_fred\') . "\\" role=\\"button\\" style=\\"display: block; text-decoration: none; background-color: #4D4D4D; background-image: url("data:image/svg+xml, %3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'48\' height=\'48\' viewBox=\'-14.584 -8.583 48 48\'%3E%3ClinearGradient id=\'a\' gradientUnits=\'userSpaceOnUse\' x1=\'2164.318\' y1=\'-2519.043\' x2=\'2047.448\' y2=\'-2442.941\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2380c3e6\'/%3E%3Cstop offset=\'1\' stop-color=\'%233380c2\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23a)\' d=\'M22.035 11.468l9.602-15.406H8.488L5.236 1.17z\'/%3E%3Cpath opacity=\'.15\' d=\'M5.236 1.17l1.702-2.633 15.097 12.931z\'/%3E%3ClinearGradient id=\'b\' gradientUnits=\'userSpaceOnUse\' x1=\'2184.769\' y1=\'-2694.977\' x2=\'2097.394\' y2=\'-2637.275\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%23f38649\'/%3E%3Cstop offset=\'.185\' stop-color=\'%23f28147\'/%3E%3Cstop offset=\'.409\' stop-color=\'%23ef7242\'/%3E%3Cstop offset=\'.654\' stop-color=\'%23ea5a3a\'/%3E%3Cstop offset=\'.911\' stop-color=\'%23e4382e\'/%3E%3Cstop offset=\'1\' stop-color=\'%23e12a29\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23b)\' d=\'M27.068 39.416V16.268l-4.957-3.176L11.583 29.74z\'/%3E%3Cpath opacity=\'.15\' d=\'M11.583 29.74l2.632 1.625 7.896-18.273z\'/%3E%3ClinearGradient id=\'c\' gradientUnits=\'userSpaceOnUse\' x1=\'1896.918\' y1=\'-2571.592\' x2=\'2064.08\' y2=\'-2467.137\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2342ab4a\'/%3E%3Cstop offset=\'1\' stop-color=\'%23add155\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23c)\' d=\'M-10.25-8.583v23.148l5.419 3.175 26.866-6.272z\'/%3E%3ClinearGradient id=\'d\' gradientUnits=\'userSpaceOnUse\' x1=\'1933.576\' y1=\'-2758.292\' x2=\'2069.413\' y2=\'-2540.907\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2342ab4a\'/%3E%3Cstop offset=\'1\' stop-color=\'%23add155\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23d)\' d=\'M-4.985 19.52l-9.599 15.093H8.565l13.546-21.521z\'/%3E%3C/svg%3E"); height: 48px; width: 48px; border-radius: 50%; outline: 0; border: none; background-repeat: no-repeat; background-size: 60%; background-position: center; box-shadow: rgba(18,55,100,0.34) 0 4px 8px; margin: 0; padding: 0; text-indent: -9999px; cursor: pointer; position: fixed; z-index: 10010; margin: 32px; bottom: 0; left: 0; opacity: 0.8; transition: .3s; box-sizing: border-box;\\" onmouseover=\\"this.style.transform=\'scale(1.05)\';\\" onmouseout=\\"this.style.transform=\'initial\'\\";>Fred";
$modx->resource->_output = preg_replace(\'/(<\\/body>(?:<\\/body>)?)/i\', "{$button}\\r\\n$1", $modx->resource->_output);
return;
}
if ($fredMode === 3) {
$modx->resource->_output = \'\';
return;
}
$html = Wa72\\HtmlPageDom\\HtmlPageCrawler::create($modx->resource->_output);
$dzs = $html->filter(\'[data-fred-dropzone]\');
$dzs->each(function(Wa72\\HtmlPageDom\\HtmlPageCrawler $node, $i) {
$node->setInnerHtml(\'\');
});
$modx->resource->_output = $html->saveHTML();
if ($fredMode === 2) {
return;
}
$scripts = $html->filter(\'script\');
$scripts->each(function(Wa72\\HtmlPageDom\\HtmlPageCrawler $node, $i) {
$newNode = Wa72\\HtmlPageDom\\HtmlPageCrawler::create(\'\');
$attrs = $node->getNode(0)->attributes;
foreach ($attrs as $attr) {
$newNode->attr($attr->nodeName, $attr->nodeValue);
}
$newNode->setAttribute(\'data-fred-script\', $node->getInnerHtml());
$node->replaceWith($newNode);
});
$modx->resource->_output = $html->saveHTML();
$beforeRenderResults = $modx->invokeEvent(\'FredBeforeRender\');
$includes = \'\';
$beforeRender = \'\';
$lexicons = [];
foreach ($beforeRenderResults as $result) {
if ($result[\'includes\']) {
$includes .= $result[\'includes\'];
}
if ($result[\'beforeRender\']) {
$beforeRender .= $result[\'beforeRender\'];
}
if ($result[\'lexicons\'] && is_array($result[\'lexicons\'])) {
$lexicons = array_merge($lexicons, $result[\'lexicons\']);
}
}
/** @var FredElementRTEConfig[] $rteConfigs */
$rteConfigs = $modx->getIterator(\'FredElementRTEConfig\');
$rteConfigString = [];
foreach ($rteConfigs as $rteConfig) {
if (empty($rteConfig->get(\'data\'))) continue;
$rteConfigString[] = $rteConfig->name . \':\' . $rteConfig->data;
}
$rteConfigString = implode(\',\', $rteConfigString);
$payload = [
\'iss\' => $modx->user->id,
\'resource\' => $modx->resource->id,
\'queryParams\' => $_GET
];
$jwt = \\Firebase\\JWT\\JWT::encode($payload, $fred->getSecret());
$fredContent = \'
\' . $includes . \'
\';
$modx->resource->_output = preg_replace(\'/(<\\/head>(?:<\\/head>)?)/i\', "{$fredContent}\\r\\n$1", $modx->resource->_output);
}
break;
case \'OnBeforeDocFormSave\':
if ($mode !== \'upd\') return;
if (empty($fred->getTheme($resource->template))) return;
$data = $resource->getProperty(\'data\', \'fred\');
if (!empty($data[\'fingerprint\'])) {
if (empty($resource->fingerprint)) {
$modx->event->_output = \'No fingerprint was provided.\';
return;
}
if ($data[\'fingerprint\'] !== $resource->fingerprint) {
$modx->event->_output = \'Your page is outdated, please reload the page.\';
return;
}
}
break;
case \'OnDocFormSave\':
if ($mode !== \'upd\') return;
if (empty($fred->getTheme($resource->template))) return;
$renderResource = new \\Fred\\RenderResource($resource, $modx);
$renderResource->render();
break;
case \'OnTemplateRemove\':
/** @var modTemplate $template */
$templateId = $template->id;
if (!empty($templateId)) {
/** @var FredThemedTemplate $themedTemplate */
$themedTemplate = $modx->getObject(\'FredThemedTemplate\', [\'template\' => $templateId]);
if ($themedTemplate) {
$themedTemplate->remove();
}
}
break;
case \'OnTVInputRenderList\':
$modx->event->output($corePath . \'elements/tvs/input/\');
break;
case \'OnTVInputPropertiesList\':
$modx->event->output($corePath . \'elements/tvs/input/options/\');
break;
case \'OnManagerPageBeforeRender\':
$modx->controller->addLexiconTopic(\'fred:default\');
break;
}
return;',
'locked' => 0,
'properties' => 'a:0:{}',
'disabled' => 0,
'moduleguid' => '',
'static' => 0,
'static_file' => '',
'content' => '/*
* This file is part of the Fred package.
*
* Copyright (c) MODX, LLC
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$corePath = $modx->getOption(\'fred.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/fred/\');
/** @var Fred $fred */
$fred = $modx->getService(
\'fred\',
\'Fred\',
$corePath . \'model/fred/\',
array(
\'core_path\' => $corePath
)
);
switch ($modx->event->name) {
case \'OnDocFormPrerender\':
if(!empty($resource) && !empty($fred->getTheme($resource->template))) {
//Disable ContentBlocks
$isContentBlocks = $resource->getProperty(\'_isContentBlocks\', \'contentblocks\', null);
if($isContentBlocks !== false){
$resource->setProperty(\'_isContentBlocks\', false, \'contentblocks\');
$resource->save();
}
$data = $resource->getProperty(\'data\', \'fred\');
$fingerprint = !empty($data[\'fingerprint\']) ? $data[\'fingerprint\'] : \'\';
//Load Open in Fred button
$modx->lexicon->load(\'fred:default\');
$modx->controller->addLexiconTopic(\'fred:default\');
$modx->controller->addHtml("
");
}
break;
case \'OnLoadWebDocument\':
$theme = $fred->getTheme($modx->resource->template);
if (!empty($theme)) {
$themeUri = $theme->getThemeFolderUri();
$modx->setPlaceholder(\'+fred.theme_dir\', $themeUri);
$modx->setOption(\'fred.theme_dir\', $themeUri);
}
break;
case \'OnWebPagePrerender\':
$theme = $fred->getTheme($modx->resource->template);
if (!empty($theme)) {
if (!$modx->user) return;
if (!($modx->user->hasSessionContext(\'mgr\') || $modx->user->hasSessionContext($modx->resource->context_key))) return;
if (!$modx->hasPermission(\'fred\')) return;
$modx->lexicon->load(\'fred:fe\');
$fredMode = 1;
if (isset($_SESSION[\'fred\'])) {
$fredMode = intval($_SESSION[\'fred\']);
}
if (isset($_GET[\'fred\'])) {
$fredMode = intval($_GET[\'fred\']);
}
if ($fredMode === 4) {
$fredMode = 0;
$_SESSION[\'fred\'] = 0;
}
if ($fredMode === 1) {
$_SESSION[\'fred\'] = 1;
}
$get = $_GET;
unset($get[$modx->getOption(\'request_param_alias\', [], \'q\')]);
if ($fredMode === 0) {
$button = "makeUrl($modx->resource->id, \'\', array_merge($get, [\'fred\' => 1]) , \'abs\')) . "\\" title=\\"" . $modx->lexicon(\'fred.fe.turn_on_fred\') . "\\" role=\\"button\\" style=\\"display: block; text-decoration: none; background-color: #4D4D4D; background-image: url("data:image/svg+xml, %3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'48\' height=\'48\' viewBox=\'-14.584 -8.583 48 48\'%3E%3ClinearGradient id=\'a\' gradientUnits=\'userSpaceOnUse\' x1=\'2164.318\' y1=\'-2519.043\' x2=\'2047.448\' y2=\'-2442.941\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2380c3e6\'/%3E%3Cstop offset=\'1\' stop-color=\'%233380c2\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23a)\' d=\'M22.035 11.468l9.602-15.406H8.488L5.236 1.17z\'/%3E%3Cpath opacity=\'.15\' d=\'M5.236 1.17l1.702-2.633 15.097 12.931z\'/%3E%3ClinearGradient id=\'b\' gradientUnits=\'userSpaceOnUse\' x1=\'2184.769\' y1=\'-2694.977\' x2=\'2097.394\' y2=\'-2637.275\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%23f38649\'/%3E%3Cstop offset=\'.185\' stop-color=\'%23f28147\'/%3E%3Cstop offset=\'.409\' stop-color=\'%23ef7242\'/%3E%3Cstop offset=\'.654\' stop-color=\'%23ea5a3a\'/%3E%3Cstop offset=\'.911\' stop-color=\'%23e4382e\'/%3E%3Cstop offset=\'1\' stop-color=\'%23e12a29\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23b)\' d=\'M27.068 39.416V16.268l-4.957-3.176L11.583 29.74z\'/%3E%3Cpath opacity=\'.15\' d=\'M11.583 29.74l2.632 1.625 7.896-18.273z\'/%3E%3ClinearGradient id=\'c\' gradientUnits=\'userSpaceOnUse\' x1=\'1896.918\' y1=\'-2571.592\' x2=\'2064.08\' y2=\'-2467.137\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2342ab4a\'/%3E%3Cstop offset=\'1\' stop-color=\'%23add155\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23c)\' d=\'M-10.25-8.583v23.148l5.419 3.175 26.866-6.272z\'/%3E%3ClinearGradient id=\'d\' gradientUnits=\'userSpaceOnUse\' x1=\'1933.576\' y1=\'-2758.292\' x2=\'2069.413\' y2=\'-2540.907\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2342ab4a\'/%3E%3Cstop offset=\'1\' stop-color=\'%23add155\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23d)\' d=\'M-4.985 19.52l-9.599 15.093H8.565l13.546-21.521z\'/%3E%3C/svg%3E"); height: 48px; width: 48px; border-radius: 50%; outline: 0; border: none; background-repeat: no-repeat; background-size: 60%; background-position: center; box-shadow: rgba(18,55,100,0.34) 0 4px 8px; margin: 0; padding: 0; text-indent: -9999px; cursor: pointer; position: fixed; z-index: 10010; margin: 32px; bottom: 0; left: 0; opacity: 0.8; transition: .3s; box-sizing: border-box;\\" onmouseover=\\"this.style.transform=\'scale(1.05)\';\\" onmouseout=\\"this.style.transform=\'initial\'\\";>Fred";
$modx->resource->_output = preg_replace(\'/(<\\/body>(?:<\\/body>)?)/i\', "{$button}\\r\\n$1", $modx->resource->_output);
return;
}
if ($fredMode === 3) {
$modx->resource->_output = \'\';
return;
}
$html = Wa72\\HtmlPageDom\\HtmlPageCrawler::create($modx->resource->_output);
$dzs = $html->filter(\'[data-fred-dropzone]\');
$dzs->each(function(Wa72\\HtmlPageDom\\HtmlPageCrawler $node, $i) {
$node->setInnerHtml(\'\');
});
$modx->resource->_output = $html->saveHTML();
if ($fredMode === 2) {
return;
}
$scripts = $html->filter(\'script\');
$scripts->each(function(Wa72\\HtmlPageDom\\HtmlPageCrawler $node, $i) {
$newNode = Wa72\\HtmlPageDom\\HtmlPageCrawler::create(\'\');
$attrs = $node->getNode(0)->attributes;
foreach ($attrs as $attr) {
$newNode->attr($attr->nodeName, $attr->nodeValue);
}
$newNode->setAttribute(\'data-fred-script\', $node->getInnerHtml());
$node->replaceWith($newNode);
});
$modx->resource->_output = $html->saveHTML();
$beforeRenderResults = $modx->invokeEvent(\'FredBeforeRender\');
$includes = \'\';
$beforeRender = \'\';
$lexicons = [];
foreach ($beforeRenderResults as $result) {
if ($result[\'includes\']) {
$includes .= $result[\'includes\'];
}
if ($result[\'beforeRender\']) {
$beforeRender .= $result[\'beforeRender\'];
}
if ($result[\'lexicons\'] && is_array($result[\'lexicons\'])) {
$lexicons = array_merge($lexicons, $result[\'lexicons\']);
}
}
/** @var FredElementRTEConfig[] $rteConfigs */
$rteConfigs = $modx->getIterator(\'FredElementRTEConfig\');
$rteConfigString = [];
foreach ($rteConfigs as $rteConfig) {
if (empty($rteConfig->get(\'data\'))) continue;
$rteConfigString[] = $rteConfig->name . \':\' . $rteConfig->data;
}
$rteConfigString = implode(\',\', $rteConfigString);
$payload = [
\'iss\' => $modx->user->id,
\'resource\' => $modx->resource->id,
\'queryParams\' => $_GET
];
$jwt = \\Firebase\\JWT\\JWT::encode($payload, $fred->getSecret());
$fredContent = \'
\' . $includes . \'
\';
$modx->resource->_output = preg_replace(\'/(<\\/head>(?:<\\/head>)?)/i\', "{$fredContent}\\r\\n$1", $modx->resource->_output);
}
break;
case \'OnBeforeDocFormSave\':
if ($mode !== \'upd\') return;
if (empty($fred->getTheme($resource->template))) return;
$data = $resource->getProperty(\'data\', \'fred\');
if (!empty($data[\'fingerprint\'])) {
if (empty($resource->fingerprint)) {
$modx->event->_output = \'No fingerprint was provided.\';
return;
}
if ($data[\'fingerprint\'] !== $resource->fingerprint) {
$modx->event->_output = \'Your page is outdated, please reload the page.\';
return;
}
}
break;
case \'OnDocFormSave\':
if ($mode !== \'upd\') return;
if (empty($fred->getTheme($resource->template))) return;
$renderResource = new \\Fred\\RenderResource($resource, $modx);
$renderResource->render();
break;
case \'OnTemplateRemove\':
/** @var modTemplate $template */
$templateId = $template->id;
if (!empty($templateId)) {
/** @var FredThemedTemplate $themedTemplate */
$themedTemplate = $modx->getObject(\'FredThemedTemplate\', [\'template\' => $templateId]);
if ($themedTemplate) {
$themedTemplate->remove();
}
}
break;
case \'OnTVInputRenderList\':
$modx->event->output($corePath . \'elements/tvs/input/\');
break;
case \'OnTVInputPropertiesList\':
$modx->event->output($corePath . \'elements/tvs/input/options/\');
break;
case \'OnManagerPageBeforeRender\':
$modx->controller->addLexiconTopic(\'fred:default\');
break;
}
return;',
),
),
'a0f4192e60d8cc6038bbb32254ad6896' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnWebPagePrerender',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnWebPagePrerender',
'priority' => 0,
'propertyset' => 0,
),
),
'dfaedf785eab506f6b48f37c84e53714' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnDocFormPrerender',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnDocFormPrerender',
'priority' => 0,
'propertyset' => 0,
),
),
'501111671ee829b4eb1e037381ebbd95' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnDocFormSave',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnDocFormSave',
'priority' => 0,
'propertyset' => 0,
),
),
'e8f6b20202e9416e30a454a6c1d5888f' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnBeforeDocFormSave',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnBeforeDocFormSave',
'priority' => 0,
'propertyset' => 0,
),
),
'51e45e7d35ca8da67bd6512f1c12a5b5' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnTemplateRemove',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnTemplateRemove',
'priority' => 0,
'propertyset' => 0,
),
),
'd40c0e6d1d8d1648c963a68cde3798d4' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnLoadWebDocument',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnLoadWebDocument',
'priority' => 0,
'propertyset' => 0,
),
),
'6a7f166b5c0ab6d45db23e30d83c1271' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnTVInputRenderList',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnTVInputRenderList',
'priority' => 0,
'propertyset' => 0,
),
),
'da2e9bb714656f59c006ff47c6d9f864' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnTVInputPropertiesList',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnTVInputPropertiesList',
'priority' => 0,
'propertyset' => 0,
),
),
'ec13d93ab8ec9930ac9afb5f2e60acfb' =>
array (
'criteria' =>
array (
'pluginid' => 14,
'event' => 'OnManagerPageBeforeRender',
),
'object' =>
array (
'pluginid' => 14,
'event' => 'OnManagerPageBeforeRender',
'priority' => 0,
'propertyset' => 0,
),
),
'80956ebc997d6cdb547f0466311f2610' =>
array (
'criteria' =>
array (
'text' => 'fred.menu.fred',
),
'object' =>
array (
'text' => 'fred.menu.fred',
'parent' => 'components',
'action' => 'home',
'description' => 'fred.menu.fred_desc',
'icon' => '',
'menuindex' => 0,
'params' => '',
'handler' => '',
'permissions' => 'fred',
'namespace' => 'fred',
),
),
);