attachListener('widgetResponseAlter', $this, 'refreshButton'); } /** * Returns verision of the plugin. * * @return string Plugin's version. */ public static function getVersion() { return '0.0.1'; } /** * Manage the button outlook. * * @param array $args Event data */ public function refreshButton(&$args) { $g = $args['asset_url_generator']; $args['response']['load']['refresh'] = $g->generate($this->getFilesPath() . '/js/refresh.js', AssetUrlGeneratorInterface::ABSOLUTE_URL); $args['response']['handlers'][] = 'refreshButton'; $args['response']['dependencies']['refreshButton'] = array('refresh'); } }