Hi folks im trying to hide add new widget when user lands on sertain page.
public function hide_add_new_widjet(BASE_CLASS_EventCollector $event)
OW::getEventManager()->bind('base.add_new_content_item', array($this, "hide_add_new_widjet"));
in:
add_new_content.php
this code:
$event = new BASE_CLASS_EventCollector(self::EVENT_NAME);
OW::getEventManager()->trigger($event);
$data = $event->getData();
if( empty($data) )
{
$this->setVisible(false);
return;
}
$this->assign('items', $event->getData());
}
if you add this:
$this->setVisible(false);
it will hide but how can i do it from my event_handler.