コード例 #1
0
ファイル: Button.php プロジェクト: BGCX262/zupal-svn-to-git
 /**
  *
  * @return <type>
  */
 public function get_value()
 {
     $value = parent::get_value();
     if (!$value) {
         return $this->get_label();
     }
     return $value;
 }
コード例 #2
0
ファイル: Text.php プロジェクト: BGCX262/zupal-svn-to-git
 /**
  *
  * @return string
  */
 public function my_props()
 {
     $props = parent::my_props();
     if (($rows = $this->get_rows()) > 1) {
         // text area.
         $props['rows'] = $rows;
         unset($props['value']);
     }
     return $props;
 }
コード例 #3
0
ファイル: Choice.php プロジェクト: BGCX262/zupal-svn-to-git
 /**
  *
  * @return <type>
  */
 public function props()
 {
     $out = parent::props();
     unset($out['value']);
     if ($this->get_type() == self::CHOICE_CHECKBOX && is_array($this->data())) {
         $out['name'] = rtrim($out['name'], '[]') . '[]';
     }
     return $out;
 }
コード例 #4
0
ファイル: Table.php プロジェクト: BGCX262/zupal-svn-to-git
 /**
  *
  * @return string
  */
 public function __toString()
 {
     $out = '';
     if ($this->get_form()->get_label()) {
         $out .= $this->head();
     }
     $out .= parent::__toString();
     return $out;
 }