39 lines
661 B
PHP
39 lines
661 B
PHP
<?php
|
|
|
|
namespace KupShop\AdminBundle\Event;
|
|
|
|
use KupShop\AdminBundle\Admin\WindowTab;
|
|
use Symfony\Contracts\EventDispatcher\Event;
|
|
|
|
/**
|
|
* For add tabs to admin windows.
|
|
*/
|
|
class WindowTabsEvent extends Event
|
|
{
|
|
/**
|
|
* Real event name is NAME_PREFIX.'orders'.
|
|
*/
|
|
public const NAME_PREFIX = 'kupshop.admin.window.';
|
|
|
|
/**
|
|
* @var WindowTab[]
|
|
*/
|
|
protected $tabs = [];
|
|
|
|
/**
|
|
* @return WindowTab
|
|
*/
|
|
public function addTab(WindowTab $windowTab)
|
|
{
|
|
return $this->tabs[] = $windowTab;
|
|
}
|
|
|
|
/**
|
|
* @return WindowTab[]
|
|
*/
|
|
public function getTabs()
|
|
{
|
|
return $this->tabs;
|
|
}
|
|
}
|