/** * Retrieve the arguments for the callback. * * @param GetOperationButtonEvent $event The event being emitted. * * @return array */ public function getArgs($event) { $extra = $event->getCommand()->getExtra(); return array($event->getModel()->getPropertiesAsArray(), $this->buildHref($event->getCommand()), $event->getLabel(), $event->getTitle(), isset($extra['icon']) ? $extra['icon'] : null, $event->getAttributes(), $event->getEnvironment()->getDataDefinition()->getName(), $event->getEnvironment()->getDataDefinition()->getBasicDefinition()->getRootEntries(), $event->getChildRecordIds(), $event->getCircularReference(), $event->getPrevious() ? $event->getPrevious()->getId() : null, $event->getNext() ? $event->getNext()->getId() : null); }