This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class ResourceManagerController extends modManagerController { | |
public static function getInstance(modX &$modx,$className,array $config = array()) { | |
if (!empty($_REQUEST['class_key'])) { | |
$resourceClass = str_replace(array('../','..','/','\\'),'',$_REQUEST['class_key']); | |
$delegateView = $modx->call($resourceClass,'getControllerPath',array(&$modx)); | |
$action = strtolower(str_replace(array('Resource','ManagerController'),'',$className)); | |
$className = str_replace('mod','',$resourceClass).ucfirst($action).'ManagerController'; | |
$controllerFile = $delegateView.$action.'.class.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* this goes in core/components/batcher/controllers/home.class.php - note the class name: "Home" matches the file name */ | |
class BatcherHomeManagerController extends BatcherManagerController { | |
/* Do any controller logic here. Can also return an array of placeholders to set, or use $this->setPlaceholder($k,$v); */ | |
public function process(array $scriptProperties = array()) { | |
} | |
/* set the page title */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class BatcherManagerController extends modManagerController { | |
public function initialize() { | |
$this->batcher = new Batcher($this->modx); | |
$this->addCss($this->batcher->config['cssUrl'].'mgr.css'); | |
$this->addJavascript($this->batcher->config['jsUrl'].'batcher.js'); | |
$this->addHtml('<script type="text/javascript"> | |
Ext.onReady(function() { | |
Batcher.config = '.$this->modx->toJSON($this->batcher->config).'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Represents a web resource managed by the MODX framework. | |
* | |
* @property int $id The ID of the Resource | |
* @property string $type The type of the resource; document/reference | |
* @property string $contentType The content type string of the Resource, such as text/html | |
* @property string $pagetitle The page title of the Resource | |
* @property string $longtitle The long title of the Resource | |
* @property string $description The description of the Resource | |
* @property string $alias The FURL alias of the resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package modx | |
*/ | |
/** | |
* Represents a Role that a User can have within a specific User Group. Roles are sorted into authority levels, where | |
* lower authority numbers will automatically inherit Permissions owned by higher authority numbers. | |
* | |
* For example, an Administrator with authority of 1 will automatically inherit any Permissions assigned to a Member | |
* role with authority 9999, since 1 is less than 9999. However, the reverse will not be true. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once $modx->getOption('formit.core_path',null,$modx->getOption('core_path',null,MODX_CORE_PATH).'components/formit/').'model/formit/formit.class.php'; | |
$fi = new FormIt($modx,$scriptProperties); | |
$fi->initialize($modx->context->get('key')); | |
$fi->loadRequest(); | |
$fields = $fi->request->prepare(); | |
return $fi->request->handle($fields); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[!FormIt? | |
&submitVar=`submit` | |
&preHooks=`[[++assets_path]]hooks/myhook.php` | |
&validate=`name:required` | |
]] | |
<form action="[[~[[*id]]]]" method="post"> | |
<label>Name: [[!+fi.error.name]] | |
<input type="text" name="name" value="[[!+fi.name]]" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* MODX Revolution | |
* | |
* Copyright 2006-2011 by MODX, LLC. | |
* All rights reserved. | |
* | |
* This program is free software; you can redistribute it and/or modify it under | |
* the terms of the GNU General Public License as published by the Free Software | |
* Foundation; either version 2 of the License, or (at your option) any later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (empty($file)) return ''; | |
$o = ''; | |
$modx->parser->processElementTags('',$file,true,true); | |
$file = str_replace(array( | |
'{core_path}', | |
'{base_path}', | |
'{assets_path}', | |
),array( | |
$modx->getOption('core_path'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHP Catchable fatal error: Argument 1 passed to DocBlox_Transformer_Behaviour_Inherit_Node_Abstract::copyShortDescription() must be an instance of DOMElement, boolean given, called in /www/docblox/src/DocBlox/Transformer/Behaviour/Inherit/Node/Abstract.php on line 259 and defined in /www/docblox/src/DocBlox/Transformer/Behaviour/Inherit/Node/Abstract.php on line 122 | |
PHP Stack trace: | |
PHP 1. {main}() /www/docblox/bin/docblox.php:0 | |
PHP 2. DocBlox_Core_Application->main() /www/docblox/bin/docblox.php:40 | |
PHP 3. DocBlox_Task_Project_Run->execute() /www/docblox/src/DocBlox/Core/Application.php:47 | |
PHP 4. DocBlox_Task_Project_Transform->execute() /www/docblox/src/DocBlox/Task/Project/Run.php:133 | |
PHP 5. DocBlox_Transformer->execute() /www/docblox/src/DocBlox/Task/Project/Transform.php:173 | |
PHP 6. DocBlox_Transformer_Behaviour_Collection->process() /www/docblox/src/DocBlox/Transformer.php:379 | |
PHP 7. DocBlox_Transformer_Behaviour_Inherit->process() /www/docblox/src/DocBlox/Transformer/Behaviour/Collection.p |