Example #1
0
 public function __construct($clanek, $obrazky = null, $ostatni_prilohy = null)
 {
     parent::__construct();
     $this->clanek = $clanek;
     $this->obrazky = $obrazky;
     $this->ostatni_prilohy = $ostatni_prilohy;
 }
Example #2
0
 /**
  * Load state (from $_GET) for the control 
  * @param array
  */
 public function loadState(array $params)
 {
     $foo = $this->params;
     parent::loadState($params);
     $this->params = $this->params + $foo;
     $this->linkOpts = array_intersect_key($this->params, array('limit' => 0, 'order' => 0, 'sorting' => 0, 'offset' => 0, 'filter' => 0));
 }
Example #3
0
 public function __construct($model)
 {
     parent::__construct();
     $this->model = $model;
     $this->teams = $model->getTeams();
     $this->results = $model->getResults();
 }
Example #4
0
 public function __construct($osoby, $action)
 {
     parent::__construct();
     $this->osoby = $osoby;
     $this->action = $action;
     $this->action = '';
 }
Example #5
0
 public function createTemplate($class = NULL)
 {
     $template = parent::createTemplate($class);
     //			$t = new MyTranslator($this->getPresenter()->lang); // provede základní nastavení pro šablony apod.
     $template->setTranslator($this->getService('translator'));
     // formatovanie cisliel v templajtoch
     $template->registerHelperLoader('FormatHelper::loadHelper');
     $template->registerHelperLoader('ImageHelper::loadHelper');
     return $template;
 }
Example #6
0
 public function __call($name, $args)
 {
     if (substr($name, 0, 6) == 'render') {
         $componentName = lcfirst(substr($name, 6));
         $component = $this->getComponent($componentName, FALSE);
         if ($component) {
             return call_user_func_array(array($component, 'render'), $args);
         }
     }
     return parent::__call($name, $args);
 }
 function __construct()
 {
     parent::__construct();
     if ($this->xmlrpc) {
         $this->captcha = new CaptchaXMLRPC("captcha.seznam.cz", 3410);
         //$this->captcha->setProxy("proxy", 3128);
     } else {
         $this->captcha = new CaptchaHTTP("captcha.seznam.cz", 80);
     }
     $this->create();
 }
Example #8
0
 public function __construct($typy, $seznam_priloh, $seznam_priloh_z_db, $typ_zobrazeni = 'admin')
 {
     parent::__construct();
     $this->typy = $typy;
     $this->typ_zobrazeni = $typ_zobrazeni;
     $i = 0;
     foreach ($typy as $key => $value) {
         self::$typy_sort[$key] = $i;
         $i++;
     }
     foreach ($seznam_priloh as $adresa => $priloha) {
         if (isset($seznam_priloh_z_db[$priloha['nazev']])) {
             $this->prilohy[$seznam_priloh_z_db[$priloha['nazev']]->typ][$adresa] = $priloha;
         } else {
             $this->prilohy['ostatni'][$adresa] = $priloha;
         }
     }
 }
Example #9
0
 protected function createComponent($name)
 {
     switch ($name) {
         default:
             parent::createComponent($name);
             break;
         case 'newsletterform':
             $form = new MyForm();
             $form->getElementPrototype()->class = 'ajax';
             $form->addText('email', 'Váš email')->addRule(NAPPFORM::FILLED, 'Email musí byť vyplnený.')->addRule(NAPPFORM::EMAIL, 'Zadaný email nieje v správnom tvare.');
             //				$form['email']->getLabelPrototype()->class = 'inlined';
             //				$form['email']->getLabelPrototype()->id = 'emaillabel';
             $form->addSubmit('sendnewsletter', 'Ok');
             $form->onSuccess[] = array($this, 'sendToEmailRegisterToNewsletter');
             return $form;
             break;
     }
 }
Example #10
0
 public function __construct($osoba, $admin = null)
 {
     parent::__construct();
     $this->osoba = $osoba;
     $this->admin = $admin;
 }
Example #11
0
 protected function createTemplate($class = NULL)
 {
     return parent::createTemplate('NTemplate');
 }
Example #12
0
 public function __construct($obrazky)
 {
     parent::__construct();
     $this->obrazky = $obrazky;
 }
Example #13
0
 public function __construct()
 {
     parent::__construct();
 }
Example #14
0
 /**
  * Loads state informations.
  * @param  array
  * @return void
  */
 public function loadState(array $params)
 {
     parent::loadState($params);
     $this->getPaginator()->page = $this->page;
 }
Example #15
0
 public function __construct($model)
 {
     parent::__construct();
     $this->model = $model;
     $this->events = $model->getEvents()->order('finished');
 }
Example #16
0
File: loader.php Project: GE3/GE3
 static function create(NControl $control, $name = NULL, $tag = 'div')
 {
     if (self::$outputAllowed) {
         $obj = new self();
         $obj->tag = trim($tag, '<>');
         if ($obj->tag) {
             echo '<', $obj->tag, ' id="', $control->getSnippetId($name), '">';
         }
         return $obj;
     } elseif ($control->isControlInvalid($name)) {
         $obj = new self();
         $obj->id = $control->getSnippetId($name);
         $obj->payload = $control->getPresenter()->getPayload();
         ob_start();
         $obj->level = ob_get_level();
         self::$outputAllowed = TRUE;
         return $obj;
     } else {
         return FALSE;
     }
 }
Example #17
0
 public function __construct($model)
 {
     parent::__construct();
     $this->model = $model;
 }
Example #18
0
 public function __construct($seznam_clanku)
 {
     parent::__construct();
     $this->seznam_clanku = $seznam_clanku;
 }
 public function __construct($prilohy)
 {
     parent::__construct();
     $this->prilohy = $prilohy;
 }
Example #20
0
 /**
  * Creating a template
  *
  * @access protected
  * @return ITemplate
  * @uses ForumControlModel::getCount()
  * @uses ForumControlModel::getTopic()
  * @uses ForumControlModel::getTopics()
  * @uses ForumControlModel::timeAgoInWords()
  * @since 1.0.0
  */
 protected function createTemplate($class = NULL)
 {
     $template = parent::createTemplate();
     if ($this->forumTopicId && !$this->model->existsTopic($this->forumTopicId)) {
         $this->forumTopicId = NULL;
     }
     $isNew = (bool) (!$this->forumTopicId);
     $form = $this['forumForm'];
     $cookie = $this->context->httpRequest->getCookie('Nette-ForumControl-Name');
     if (!$form->isSubmitted() && isset($cookie)) {
         $form->setDefaults(array('name' => $cookie));
     }
     $topicsForm = $this['forumTopicsForm'];
     $topicsForm->setAction($this->presenter->link($this->presenter->view));
     if ($this->forumSelectedTopicsIds) {
         $topicsForm->setDefaults(array($this->forumSelectedTopicsContainer => $this->forumSelectedTopicsIds));
     }
     $template->forumTopicsCount = $this->model->getCount();
     $template->forumReplyTo = !$isNew ? $this->model->getTopic($this->forumTopicId) : '';
     $template->forumShowForm = $this->forumTopicId !== NULL && $this->forumAllTopics === FALSE && !is_array($this->forumSelectedTopicsIds);
     $template->forumShowAll = $this->forumAllTopics === TRUE;
     $template->forumSelectedTopics = is_array($this->forumSelectedTopicsIds) ? $this->model->getTopics(array_keys($this->forumSelectedTopicsIds)) : FALSE;
     $template->forumSelectedTopicsContainer = $this->forumSelectedTopicsContainer;
     $template->forumThreads = $this->forumThreads;
     $template->forumTopicsForm = $topicsForm;
     $template->registerHelper('timeAgoInWords', 'Nette\\Extras\\ForumControl\\ForumControlModel::timeAgoInWords');
     return $template;
 }
Example #21
0
 protected function createTemplate($class = NULL)
 {
     $template = parent::createTemplate($class);
     $template->registerHelper('datumClanku', callback($this, 'helperDatumClanku'));
     return $template;
 }
Example #22
0
 public function __construct($clanek)
 {
     parent::__construct();
     $this->clanek = $clanek;
 }
Example #23
0
 protected function createComponent($name)
 {
     $this->load();
     return parent::createComponent($name);
 }
Example #24
0
	public static function renderSnippets(NControl $control, stdClass $local, array $params)
	{
		$control->snippetMode = FALSE;
		$payload = $control->getPresenter()->getPayload();
		if (isset($local->blocks)) {
			foreach ($local->blocks as $name => $function) {
				if ($name[0] !== '_' || !$control->isControlInvalid(substr($name, 1))) {
					continue;
				}
				ob_start();
				$function = reset($function);
				$snippets = $function($local, $params);
				$payload->snippets[$id = $control->getSnippetId(substr($name, 1))] = ob_get_clean();
				if ($snippets) {
					$payload->snippets += $snippets;
					unset($payload->snippets[$id]);
				}
			}
		}
		$control->snippetMode = TRUE;
		if ($control instanceof IRenderable) {
			$queue = array($control);
			do {
				foreach (array_shift($queue)->getComponents() as $child) {
					if ($child instanceof IRenderable) {
						if ($child->isControlInvalid()) {
							$child->snippetMode = TRUE;
							$child->render();
							$child->snippetMode = FALSE;
						}
					} elseif ($child instanceof IComponentContainer) {
						$queue[] = $child;
					}
				}
			} while ($queue);
		}
	}
Example #25
0
 public function __construct($osoby)
 {
     parent::__construct();
     $this->osoby = $osoby;
 }