Zend_View_Interface PHP Class Code Examples

This page contains top rated real world PHP examples of class Zend_View_Interface extracted from open source projects. You can rate examples to help us improve the quality of examples

Example #1
Show file File: UiWidget.php Project: yarzartun/zf1-extras
0
 /**
  * Set view and enable jQuery Core and UI libraries
  *
  * @param  Zend_View_Interface $view
  * @return ZendX_JQuery_View_Helper_Widget
  */
 public function setView(Zend_View_Interface $view)
 {
     parent::setView($view);
     $this->jquery = $this->view->jQuery();
     $this->jquery->enable()->uiEnable();
     return $this;
 }
Example #2
Show file File: PagePanel.php Project: GemsTracker/MUtil
0
 /**
  * Set the View object
  *
  * @param  \Zend_View_Interface $view
  * @return \MUtil_Html_PagePanel (continuation pattern)
  */
 public function setView(\Zend_View_Interface $view)
 {
     if ($this->_paginator) {
         $this->_paginator->setView($view);
     }
     return parent::setView($view);
 }
Example #3
Show file File: EntryBusinessProcess.php Project: DBezemer/server
0
 public function plug(Zend_View_Interface $view)
 {
     $entry = $view->investigateData->entry;
     $this->entryId = $entry->id;
     $this->partnerId = $entry->partnerId;
     parent::plug($view);
 }
Example #4
Show file File: Captcha.php Project: arendasistemasintegrados/mateusleme
0
 /**
  * Render form element
  *
  * @param  Zend_View_Interface $view
  * @return string
  */
 public function render(Zend_View_Interface $view = null)
 {
     $captcha = $this->getCaptcha();
     $captcha->setName($this->getFullyQualifiedName());
     if (!$this->loadDefaultDecoratorsIsDisabled()) {
         // fieldSize decorator mus be first
         $fieldSize = $this->getDecorator('FieldSize');
         $this->removeDecorator('FieldSize');
         // duplicated text field generated by ViewHelper decorator
         $this->removeDecorator('ViewHelper');
         $decorators = $this->getDecorators();
         $decorator = $captcha->getDecorator();
         $key = get_class($this->_getDecorator($decorator, null));
         if (!empty($decorator) && !array_key_exists($key, $decorators)) {
             array_unshift($decorators, $decorator);
         }
         $decorator = array('Captcha', array('captcha' => $captcha));
         $key = get_class($this->_getDecorator($decorator[0], $decorator[1]));
         if ($captcha instanceof Zend_Captcha_Word && !array_key_exists($key, $decorators)) {
             array_unshift($decorators, $decorator);
         }
         array_unshift($decorators, $fieldSize);
         $this->setDecorators($decorators);
     }
     $this->setValue($this->getCaptcha()->generate());
     return parent::render($view);
 }
Example #5
Show file File: FormErrors.php Project: febryantosulistyo/ClassicSocial
0
 /**
  * Recurse through a form object, rendering errors
  * 
  * @param  Zend_Form $form 
  * @param  Zend_View_Interface $view 
  * @return string
  */
 protected function _recurseForm(Zend_Form $form, Zend_View_Interface $view)
 {
     $content = '';
     $errors = $form->getMessages();
     if ($form instanceof Zend_Form_SubForm || @$form->isSubForm) {
         $name = $form->getName();
         if (1 == count($errors) && array_key_exists($name, $errors)) {
             $errors = $errors[$name];
         }
     }
     if (empty($errors)) {
         return $content;
     }
     foreach ($errors as $name => $list) {
         $element = $form->{$name};
         if (null === $element && is_numeric($name)) {
             $content .= $this->getMarkupListItemStart() . $view->formErrors((array) $list, $this->getOptions()) . $this->getMarkupListItemEnd();
         } else {
             if ($element instanceof Zend_Form_Element) {
                 $element->setView($view);
                 $content .= $this->getMarkupListItemStart() . ($this->_skipLabels ? '' : $this->renderLabel($element, $view)) . $view->formErrors($list, $this->getOptions()) . $this->getMarkupListItemEnd();
             } elseif (!$this->ignoreSubForms() && $element instanceof Zend_Form) {
                 $content .= $this->_recurseForm($element, $view);
             }
         }
     }
     return $content;
 }
Example #6
Show file File: Email.php Project: febryantosulistyo/ClassicSocial
0
 public function render(Zend_View_Interface $view = null)
 {
     if ($this->isEmailAntispamEnabled()) {
         $this->{$this->_orgEmailFieldName}->setValue('');
     }
     return parent::render($view);
 }
Example #7
Show file File: FormErrors.php Project: romlg/cms36
0
 /**
  * Recurse through a form object, rendering errors
  *
  * @param  Zend_Form $form
  * @param  Zend_View_Interface $view
  * @return string
  */
 protected function _recurseForm(Zend_Form $form, Zend_View_Interface $view)
 {
     $content = '';
     $custom = $form->getCustomMessages();
     if ($this->getShowCustomFormErrors() && count($custom)) {
         $content .= $this->getMarkupListItemStart() . $view->formErrors($custom, $this->getOptions()) . $this->getMarkupListItemEnd();
     }
     foreach ($form->getElementsAndSubFormsOrdered() as $subitem) {
         if ($subitem instanceof Zend_Form_Element && !$this->getOnlyCustomFormErrors()) {
             $messages = $subitem->getMessages();
             if (count($messages)) {
                 $subitem->setView($view);
                 $content .= $this->getMarkupListItemStart() . $this->renderLabel($subitem, $view) . $view->formErrors($messages, $this->getOptions()) . $this->getMarkupListItemEnd();
             }
         } else {
             if ($subitem instanceof Zend_Form && !$this->ignoreSubForms()) {
                 $markup = $this->_recurseForm($subitem, $view);
                 if (!empty($markup)) {
                     $content .= $this->getMarkupListStart() . $markup . $this->getMarkupListEnd();
                 }
             }
         }
     }
     return $content;
 }
Example #8
Show file File: Dijit.php Project: bartolomeu/estoque_gusella
0
 /**
  * Set view
  *
  * Set view and enable dojo
  *
  * @param  Zend_View_Interface $view
  * @return Zend_Dojo_View_Helper_Dijit
  */
 public function setView(Zend_View_Interface $view)
 {
     parent::setView($view);
     $this->dojo = $this->view->dojo();
     $this->dojo->enable();
     return $this;
 }