コード例 #1
0
 function generate_contents(&$code)
 {
     parent::generate_contents($code);
     $v1 = '$' . $code->get_temp_variable();
     $v2 = '$' . $code->get_temp_variable();
     $code->write_php($v1 . ' =& request :: instance();');
     $code->write_php("if({$v2} = {$v1}->get_attribute('node_id')){");
     $code->write_php("echo \"<input type='hidden' name='node_id' value='{$v2}'>\";}");
 }
コード例 #2
0
 function generate_contents(&$code)
 {
     $content = '$' . $code->get_temp_variable();
     $code->write_php('ob_start();');
     parent::generate_contents($code);
     $code->write_php("{$content} = ob_get_contents();ob_end_clean();");
     $code->write_php($this->get_component_ref_code() . "->append_request_attributes({$content});");
     $code->write_php("echo {$content};");
 }
コード例 #3
0
 /**
  *
  * @param code $ _writer
  * @return void
  * @access protected
  */
 function generate_constructor(&$code)
 {
     parent::generate_constructor($code);
     if (array_key_exists('error_class', $this->attributes)) {
         $code->write_php($this->get_component_ref_code() . '->error_class = \'' . $this->attributes['error_class'] . '\';');
         unset($this->attributes['error_class']);
     }
     if (array_key_exists('error_style', $this->attributes)) {
         $code->write_php($this->get_component_ref_code() . '->error_style = \'' . $this->attributes['error_style'] . '\';');
         unset($this->attributes['error_style']);
     }
 }
コード例 #4
0
 function prepare()
 {
     parent::prepare();
     if (isset($this->attributes['locale_type'])) {
         if (strtolower($this->attributes['locale_type']) == 'content') {
             $locale_constant = constant('CONTENT_LOCALE_ID');
         } else {
             $locale_constant = constant('MANAGEMENT_LOCALE_ID');
         }
     } else {
         $locale_constant = constant('MANAGEMENT_LOCALE_ID');
     }
     if (isset($this->attributes['locale_value'])) {
         if (isset($this->attributes['locale_file'])) {
             $this->attributes['value'] = strings::get($this->attributes['locale_value'], $this->attributes['locale_file'], $locale_constant);
         } else {
             $this->attributes['value'] = strings::get($this->attributes['locale_value'], 'common', $locale_constant);
         }
     }
 }
コード例 #5
0
 function post_generate(&$code)
 {
   parent :: post_generate(&$code);
   $code->write_html("<th class=\"sep\"><img src='/shared/images/1x1.gif'></th>");
 }
コード例 #6
0
 function post_generate(&$code)
 {
     parent::post_generate($code);
     $code->write_php($this->get_component_ref_code() . '->render_js_validation();');
     $code->write_php($this->get_component_ref_code() . '->render_errors();');
 }
コード例 #7
0
 function post_generate(&$code)
 {
   parent :: post_generate($code);
   $code->write_html("<td class=\"sep\"></td>");
 }
コード例 #8
0
 function generate_contents(&$code)
 {
     parent::generate_contents($code);
     $code->write_php('if(isset($_REQUEST["node_id"]))echo "<input type=\'hidden\' name=\'node_id\' value=\'{$_REQUEST["node_id"]}\'>";');
 }