コード例 #1
0
 /**
  * Get the json object for a screen
  * @param AppBuilderAPIElement $screen
  * @internal used by appbuilder
  * @return array
  */
 public static function getScreenAsObj($screen, $refreshAfter = 0)
 {
     $screenObj =& $screen->getObj();
     $obj = array('main' => $screenObj['id'], 'maintype' => $screen instanceof AppBuilderAPIApp ? 'app' : 'screen', 'data' => array('screens' => array(), 'images' => array(), 'items' => array(), 'styles' => array(), 'files' => array()), 'refreshAfter' => $refreshAfter);
     $screen->getObjects($obj['data']);
     return $obj;
 }
コード例 #2
0
 public function getObjects(&$obj)
 {
     parent::getObjects($obj);
     $myObj =& $this->getObj();
     $ordering = 1;
     foreach ($this->children as $child) {
         $childObj =& $child->getObj();
         if ($childObj) {
             $childObj['screen'] = $myObj['id'];
             $childObj['ordering'] = $ordering++;
         }
         $child->getObjects($obj);
     }
 }
コード例 #3
0
 public function getObjects(&$obj)
 {
     parent::getObjects($obj);
     $myObj =& $this->getObj();
     $myImage =& $this->getImageObject('image');
     if ($myImage) {
         $obj['images'][$myImage['id']] = $myImage;
     }
     $mySplashImage =& $this->getImageStyleObject('splash');
     if ($mySplashImage) {
         $obj['images'][$mySplashImage['id']] = $mySplashImage;
     }
     $ordering = 1;
     foreach ($this->tabs as $child) {
         $childObj =& $child->getObj();
         if ($childObj) {
             $childObj['app'] = $myObj['id'];
             $childObj['ordering'] = $ordering++;
         }
         $child->getObjects($obj);
     }
 }