public function testListenerResponse() { $c = new Container(); $ctrl = new Controller($c); $ctrlS = $ctrl->setListenerResponse('foo'); $this->assertEquals($ctrl, $ctrlS); $this->assertEquals('foo', $ctrl->getListenerResponse()); }
public function __construct(ContainerInterface $container) { parent::__construct($container); if ($this instanceof WidgetInterface) { add_action('widgets_init', array($this, 'registerWidgets')); } if ($this instanceof ShortcodeInterface) { $this->registerShortcodes(); } if ($this instanceof AjaxInterface) { $this->registerAjaxHook(); } if ($this instanceof TinyMceInterface) { //add the tinyMce plugins for shortcode generator //add_action('init', array($this, 'tinyMceInit')); if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) { return; } if (get_user_option('rich_editing') == 'true') { add_filter('mce_external_plugins', array($this, 'registerTinyMcePlugins')); add_filter('mce_buttons', array($this, 'registerTinyMceButtons')); } } return $this; }