当前位置: 首页>>代码示例>>PHP>>正文


PHP Box::get方法代码示例

本文整理汇总了PHP中Box::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Box::get方法的具体用法?PHP Box::get怎么用?PHP Box::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Box的用法示例。


在下文中一共展示了Box::get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: boxEdit

 /**
  * Show the member edit page
  *
  * @return string Returns the member edit page as HTML code.
  */
 public function boxEdit()
 {
     if ($Box = Box::get()->byID($this->request->param('ID'))) {
         $GLOBALS['BoxID'] = $Box->ID;
     }
     return $this->customise(new ArrayData(array("Title" => _t('AdminBoxEdit.TITLE', 'AdminBoxEdit.TITLE'), "Form" => $this->BoxEditForm(), "Box" => $Box)))->renderWith(array('BoxAdmin_boxedit', 'BoxAdmin', $this->stat('template_main'), $this->stat('template')));
 }
开发者ID:andrelohmann,项目名称:vagrant-cloud,代码行数:12,代码来源:BoxAdminController.php

示例2: doAdd

 public function doAdd(array $data)
 {
     //print_r($data, true); die();
     if ($Box = Box::get()->byID($data['BoxID'])) {
         $Box->Description = $data['Description'];
         // Update Description
         $Box->write();
         $Version = new BoxVersion();
         $Version->Version = $data['Version'];
         $Version->BoxID = $Box->ID;
         $Version->write();
         $Provider = new BoxProvider();
         $Provider->Name = 'virtualbox';
         $Provider->VersionID = $Version->ID;
         $Provider->ChecksumType = 'sha1';
         $this->saveInto($Provider);
         //$Provider->write();
         $Provider->Checksum = sha1_file($Provider->File()->getFullPath());
         $Provider->write();
     } else {
         $this->sessionMessage(_t('BoxAddVersionForm.INVALIDBOX', 'BoxAddVersionForm.INVALIDBOX'), 'bad');
         return $this->controller->redirectBack();
     }
     $this->controller->redirect('cloud/index');
 }
开发者ID:andrelohmann,项目名称:vagrant-cloud,代码行数:25,代码来源:BoxAddVersionForm.php

示例3: doEdit

 public function doEdit(array $data)
 {
     if ($Box = Box::get()->byID($data['ID'])) {
         $this->saveInto($Box);
         $Box->write();
     }
     $this->controller->redirect('boxadmin/boxes');
 }
开发者ID:andrelohmann,项目名称:vagrant-cloud,代码行数:8,代码来源:BoxEditForm.php

示例4: doAdd

 public function doAdd(array $data)
 {
     if ($Box = Box::get()->filter(array("Title" => $data['Title']))->first()) {
         $this->addErrorMessage('Title', _t('BoxAddForm.TITLEEXISTS', 'BoxAddForm.TITLEEXISTS'), 'bad');
         $this->controller->redirectBack();
         return false;
     }
     $Box = Box::create();
     $this->saveInto($Box);
     $Box->write();
     $this->controller->redirect('boxadmin/boxes');
 }
开发者ID:andrelohmann,项目名称:vagrant-cloud,代码行数:12,代码来源:BoxAddForm.php

示例5: index

 /**
  * Show the "login" page
  *
  * @return string Returns the "login" page as HTML code.
  */
 public function index()
 {
     // Vorerst keine Seite erstellt
     return $this->customise(new ArrayData(array("Title" => _t('Cloud.TITLE', 'Cloud.TITLE'), "Content" => _t('Cloud.CONTENT', 'Cloud.CONTENT'), "PublicBoxes" => Box::get()->filter(array('Public' => true)), "MyBoxes" => Member::currentUser()->Boxes())))->renderWith(array('Cloud_index', 'Home', $this->stat('template_main'), $this->stat('template')));
 }
开发者ID:andrelohmann,项目名称:vagrant-cloud,代码行数:10,代码来源:CloudController.php


注:本文中的Box::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。