/** * @param Table $tableHelper * @param TableRowModel $tableRow * @param $links * @return mixed */ public static function getLinksFromListeners(Table $tableHelper, TableRowModel $tableRow, $links) { $responseCollection = $tableHelper->getEventManager()->trigger(DataGridEvents::DATAGRID_PRE_PRINTTABLECONTENTROWACTIONS, __CLASS__, array('links' => $links, 'entity' => $tableRow)); foreach ($responseCollection as $response) { if (is_array($response) && isset($response['links'])) { $links = $response['links']; } } return $links; }
/** * @param Table $tableHelper * @return mixed */ public static function getHeaderColumnsFromListeners(Table $tableHelper) { $responseCollection = $tableHelper->getEventManager()->trigger(DataGridEvents::DATAGRID_PRE_PRINTTABLEHEADROW, __CLASS__, array('tableHelper' => $tableHelper)); foreach ($responseCollection as $response) { if (is_array($response) && isset($response['tableHelper'])) { $tableHelper = $response['tableHelper']; } } return $tableHelper; }