public function addAction() { // TODO Auto-generated ChannelController::indexAction() default action $arUser = $this->authenticate(); if (!$this->_request->isPost()) { return; } $channels = new Channels(); $channelID = $channels->addChannel($this->getRequest()->getParam('title'), $arUser['id']); if ($channelID !== false) { $this->_helper->redirector->goto('add', 'item', null, array('channel_id' => $channelID)); } }
public static function addChannels($chans) { foreach ($chans as $chan) { Channels::addChannel($chan); } }