public function prepare() { $this->attributes['type'] = 'checkbox'; $grid_tag = $this->findParentByClass('grid_list_tag'); $grid_tag->setFormRequired(); parent :: prepare(); }
public function preGenerate($code) { if(isset($this->attributes['attach_form_prefix'])) $code->writePhp($this->getComponentRefCode() . '->attach_form_prefix(true);'); else $code->writePhp($this->getComponentRefCode() . '->attach_form_prefix(false);'); parent :: preGenerate($code); }
/** * Ignore the compiler time contents and generate the contents at run time. */ public function generateContents($code) { if(isset($this->attributes['default_value'])) $code->writePhp($this->getComponentRefCode() . '->set_default_value("' . $this->attributes['default_value'] . '");'); $code->writePhp($this->getComponentRefCode() . '->render_contents();'); parent :: generateContents($code); }
public function preGenerate($code) { $name = '$' . $code->getTempVariable(); $parent = $this->getDataspaceRefCode(); $ref = $this->getComponentRefCode(); $code->writePhp(" if ({$name} = {$parent}->get('" . $this->attributes['name']. "')) {$ref}->set_attribute('name', {$name}); "); parent :: preGenerate($code); }
/** * Sets the runtime_component_path property, depending on the type of * Input tag */ public function prepare() { $type = strtolower($this->attributes['type']); switch ($type) { case 'text': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_text_component'; break; case 'password': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_password_component'; break; case 'checkbox': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_checkbox_component'; break; case 'submit': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_submit_component'; break; case 'radio': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_radio_component'; break; case 'reset': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_reset_component'; break; case 'file': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_file_component'; break; case 'hidden': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_hidden_component'; break; case 'image': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_image_component'; break; case 'button': $this->runtime_component_path = dirname(__FILE__) . '/../../components/form/input_button_component'; break; default: throw new WactException('unknown input type', array('tag' => $this->tag, 'type' => $type, 'file' => $this->source_file, 'line' => $this->starting_line_no)); } parent :: prepare(); }
public function generateContents($code) { parent :: generateContents($code); $code->writePhp($this->getComponentRefCode() . '->render_date();'); }
function generateContents(&$code) { parent :: generateContents($code); $code->writePhp($this->getComponentRefCode() . '->renderJSCheckbox();'); }
public function preGenerate($code) { $code->writePhp($this->getComponentRefCode() . '->init_richedit();'); parent :: preGenerate($code); }