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


PHP BlockController::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($obj = null)
 {
     parent::__construct($obj);
     if (!$this->title) {
         $this->title = t("My Video");
     }
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:7,代码来源:controller.php

示例2: __construct

 public function __construct($obj = null)
 {
     $this->cID = null;
     $this->bID = null;
     parent::__construct($obj);
     $c = Page::getCurrentPage();
     if (is_object($c)) {
         $this->cID = $c->getCollectionID();
     }
     if ($this->bID) {
         $db = Database::connection();
         $v = array($this->bID);
         $q = "SELECT optionID, optionName, displayOrder FROM btSurveyOptions WHERE bID = ? ORDER BY displayOrder ASC";
         $r = $db->query($q, $v);
         $this->options = array();
         if ($r) {
             while ($row = $r->fetchRow()) {
                 $opt = new Option();
                 $opt->optionID = $row['optionID'];
                 $opt->cID = $this->cID;
                 $opt->optionName = $row['optionName'];
                 $opt->displayOrder = $row['displayOrder'];
                 $this->options[] = $opt;
             }
         }
     }
 }
开发者ID:masteramuk,项目名称:concrete5,代码行数:27,代码来源:controller.php

示例3: switch

    function __construct($obj = null)
    {
        if (is_object($obj)) {
            switch (strtolower(get_class($obj))) {
                case "blocktype":
                    // instantiating autonav on a particular collection page, instead of adding
                    // it through the block interface
                    $this->bID = null;
                    break;
                case "block": // block
                    // standard block object
                    $this->bID = $obj->bID;
                    break;
            }
        }

        $c = Page::getCurrentPage();
        if (is_object($c)) {
            if ($c->getCollectionPointerOriginalID() > 0) {
                $this->cID = $c->getCollectionPointerOriginalID();
            } else {
                $this->cID = $c->getCollectionID();
            }
            $this->cParentID = $c->getCollectionParentID();
        }

        parent::__construct($obj);
    }
开发者ID:robertdamoc,项目名称:concrete5,代码行数:28,代码来源:controller.php

示例4: __construct

 public function __construct($b = null)
 {
     parent::__construct($b);
     //$this->bID = intval($this->_bID);
     if (is_string($this->thankyouMsg) && !strlen($this->thankyouMsg)) {
         $this->thankyouMsg = $this->getDefaultThankYouMsg();
     }
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:8,代码来源:controller.php

示例5: __construct

 /**
  * Instantiates the block controller.
  *
  * @param BlockType|null $obj
  * @param \Concrete\Core\Statistics\UsageTracker\AggregateTracker $tracker
  */
 public function __construct($obj = null, AggregateTracker $tracker = null)
 {
     parent::__construct($obj);
     $this->tracker = $tracker;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:11,代码来源:controller.php

示例6:

 function __construct($obj = null)
 {
     parent::__construct($obj);
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:4,代码来源:controller.php


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