/** * Command event handler. * * This event handler is called when a command is issued by the user. * * @param Zikula_Form_View $view The form view instance. * @param array $args Additional arguments. * * @return mixed Redirect or false on errors. */ public function handleCommand(Zikula_Form_View $view, &$args) { // get collection id $collectionId = $this->request->query->filter('collectionId', 0, FILTER_SANITIZE_NUMBER_INT); if ($collectionId == 0) { return LogUtil::registerError(__('Sorry. There is no valid collection id!')); } // get channel id from form $channelId = $this->request->request->filter('channelId', '', FILTER_SANITIZE_STRING); $serviceManager = ServiceUtil::getManager(); $controllerHelper = new MUVideo_Util_Controller($serviceManager); return $controllerHelper->getYoutubeVideos($channelId[0], $collectionId); // return $this->view->redirect($this->getRedirectUrl($args)); }