Пример #1
0
 /** {@inheritdoc} */
 public function saveBack(\Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->source = $values['source'];
     $this->title = $values['title'];
     $this->description = $values['description'];
     $this->link = $values['link'];
 }
Пример #2
0
 /** {@inheritdoc} */
 public function saveBack(Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->content = $values['content'];
 }
Пример #3
0
 /** {@inheritdoc} */
 public function saveBack(Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->direction = $values['direction'];
     $this->rootPageId = $values['root'];
 }
Пример #4
0
 /** {@inheritdoc} */
 public function saveBack(Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->flash = $values['embed']['flash'];
     $this->method = $values['embed']['method'];
     $this->width = $values['embed']['width'];
     $this->height = $values['embed']['height'];
     $this->target = $values['embed']['target'];
     $this->version = $values['embed']['version'];
     $this->expressInstall = $values['embed']['express_install'];
     $this->addToFlashvars = (array) $values['embed']['add_to_flashvars'];
     $this->alternativeContent = $values['embed']['alternative_content'];
     $this->attributes = self::filterEmpty($values['attributes']);
     $this->params = self::filterEmpty($values['params']);
     $this->flashvars = (array) $values['flashvars'];
     $this->className = $values['emodule']['class_name'];
     $this->template = $values['emodule']['template'];
     $this->moduleFlashvar = $values['emodule']['flashvar'];
     // Create module instance
     if ($this->className) {
         if (!$this->module instanceof $this->className) {
             $this->module = new $this->className();
         }
     } else {
         $this->module = null;
     }
     $subform = $form->getSubForm('submodule');
     if ($this->module && $subform) {
         $this->module->setModuleDataId(false);
         $this->module->saveBack($subform);
     }
 }
Пример #5
0
 public function subFormIsValid(Zend_Form_SubForm $subForm, array $data)
 {
     $name = $subForm->getName();
     if ($subForm->isValid($data)) {
         $this->getSessionNamespace()->{$name} = $subForm->getValues();
         return true;
     }
     return false;
 }
Пример #6
0
 /** {@inheritdoc} */
 public function saveBack(\Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->script = (array) $values['script'];
     $this->stylesheet = (array) $values['stylesheet'];
     $this->inlineScript = $values['inline_script']['source'];
 }
Пример #7
0
 /** {@inheritdoc} */
 public function saveBack(Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->images = $values;
 }
Пример #8
0
 /** {@inheritdoc} */
 public function saveBack(\Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->to = $values['to'];
     $this->from = $values['from'];
     $this->sender = $values['sender'];
     $this->subject = $values['subject'];
 }
Пример #9
0
 /** {@inheritdoc} */
 public function saveBack(Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->snippetLength = $values['snippet_length'];
     $this->onlyThisLanguage = $values['only_this_language'];
     $this->alwaysWildcard = $values['always_wildcard'];
 }
Пример #10
0
 /** {@inheritdoc} */
 public function saveBack(\Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     if ($form->advanced->switch->isChecked()) {
         $this->editor = $values['advanced']['editor'];
     } else {
         $this->content = $values['content'];
         $this->allowTemplateSyntax = (bool) $values['advanced']['allow_template_syntax'];
     }
 }
Пример #11
0
 /**
  * Przeciążenie związane z tym, że wszystkie formularze dziedziczą po Zend_SubForm
  *
  * @param bool $suppressArrayNotation
  * @return array
  */
 public function getValues($suppressArrayNotation = true)
 {
     $values = parent::getValues($suppressArrayNotation);
     $elements = parent::getElements();
     foreach ($elements as $key => $ele) {
         if ($ele instanceof Zend_Form_Element_Hash) {
             unset($values[$key]);
         }
     }
     return $values;
 }
Пример #12
0
 /** {@inheritdoc} */
 public function saveBack(\Zend_Form_SubForm $form)
 {
     $values = $form->getValues(true);
     $this->pageId = $values['page_id'] ? $values['page_id'] : null;
     $this->depthOffset = $values['depth_offset'];
     $this->useParentPage = $values['use_parent_page'];
     $this->showHidden = $values['show_hidden'];
     $this->sortOrder = $values['sort_order'];
 }