コード例 #1
0
ファイル: class.php プロジェクト: shads196770/cbox-theme
 /**
  */
 public function renderable()
 {
     // determine if template should be rendered
     if (true === parent::renderable()) {
         // grab toggle option from registry
         $opt_toggle = $this->get_suboption('toggle');
         // check if toggle is on
         if ($opt_toggle && true == $opt_toggle->get()) {
             return true;
         }
     }
     // toggle is not set or set to false;
     return false;
 }
コード例 #2
0
ファイル: class.php プロジェクト: shads196770/cbox-theme
 /**
  */
 public function renderable()
 {
     // check parent
     if (true === parent::renderable()) {
         // get toggle option
         $opt_toggle = (bool) $this->get_suboption('toggle')->get();
         // enabled?
         if (true === $opt_toggle) {
             // yep, check image url
             if (null != $this->image_url()) {
                 // there is an image url
                 return true;
             }
         }
     }
     return false;
 }