*/
var $_isSorted;
+ /**
+ * @param $name
+ */
public function __construct($name) {
// Templates injected into regions should normally be file names, but sometimes inline notation is handy.
require_once 'CRM/Core/Smarty/resources/String.php';
* - jquery: string, Javascript code which runs inside a jQuery(function($){...}); block
* - style: string, CSS code
* - styleUrl: string, URL of a CSS file
+ *
+ * @return array
*/
public function add($snippet) {
static $types = array('markup', 'template', 'callback', 'scriptUrl', 'script', 'jquery', 'style', 'styleUrl');
return $snippet;
}
+ /**
+ * @param $name
+ * @param $snippet
+ */
public function update($name, $snippet) {
$this->_snippets[$name] = array_merge($this->_snippets[$name], $snippet);
$this->_isSorted = FALSE;
}
+ /**
+ * @param $name
+ *
+ * @return mixed
+ */
public function &get($name) {
return @$this->_snippets[$name];
}
return $html;
}
+ /**
+ * @param $a
+ * @param $b
+ *
+ * @return int
+ */
static function _cmpSnippet($a, $b) {
if ($a['weight'] < $b['weight']) return -1;
if ($a['weight'] > $b['weight']) return 1;