コード例 #1
0
 /**
  * Initialize default handlers
  * @param SLB_Content_Handlers $handlers Handlers controller
  */
 public function init_defaults($handlers)
 {
     $src_base = $this->util->get_file_url('content-handlers', true);
     $js_path = 'js/';
     $js_path .= SLB_DEV ? 'dev' : 'prod';
     $defaults = array('image' => array('match' => $this->m('match_image'), 'scripts' => array(array('base', "{$src_base}/image/{$js_path}/handler.image.js"))));
     foreach ($defaults as $id => $props) {
         $handlers->add($id, $props);
     }
 }