public function postGenerate($code) { parent :: postGenerate($code); $code->writePhp($this->getComponentRefCode() . '->render_js_validation();'); $code->writePhp($this->getComponentRefCode() . '->render_errors();'); }
public function generateConstructor($code) { parent::generateConstructor($code); if (array_key_exists('error_class', $this->attributes)) { $code->writePhp($this->getComponentRefCode() . '->error_class = \'' . $this->attributes['error_class'] . '\';'); unset($this->attributes['error_class']); } if (array_key_exists('error_style', $this->attributes)) { $code->writePhp($this->getComponentRefCode() . '->error_style = \'' . $this->attributes['error_style'] . '\';'); unset($this->attributes['error_style']); } }
public function generateContents($code) { $content = '$' . $code->getTempVariable(); $code->writePhp('ob_start();'); parent :: generateContents($code); $code->writePhp("{$content} = ob_get_contents();ob_end_clean();"); $code->writePhp($this->getComponentRefCode() . "->appendRequestAttributes({$content});"); $code->writePhp("echo {$content};"); }
function generateContents(&$code) { $content = $code->getTempVarRef(); $attributes = $code->getTempVarRef(); $code->writePhp('ob_start();'); parent :: generateContents($code); $code->writePhp("{$attributes} = explode(',', '" . $this->getAttribute('attributes') . "');"); $code->writePhp("{$content} = ob_get_contents();ob_end_clean();"); $code->writePhp($this->getComponentRefCode() . "->setAttributesToTransfer({$attributes});"); $code->writePhp($this->getComponentRefCode() . "->appendRequestAttributes({$content});"); $code->writePhp("echo {$content};"); }
public function generateContents($code) { parent :: generateContents($code); $v = '$' . $code->getTempVariable(); $code->writePhp("if({$v} = Limb :: toolkit()->getRequest()->get('node_id')){"); $code->writePhp("echo \"<input type='hidden' name='node_id' value='{$v}'>\";}"); }