本文整理匯總了PHP中Page_Controller::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Page_Controller::__construct方法的具體用法?PHP Page_Controller::__construct怎麽用?PHP Page_Controller::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Page_Controller
的用法示例。
在下文中一共展示了Page_Controller::__construct方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Page
function __construct($data = null)
{
if (!$data) {
$data = new Page();
$data->Title = "Unsubscribe";
}
parent::__construct($data);
}
示例2: __construct
public function __construct($controller, $name, DataObjectInterface $payable, $amount)
{
if (!is_numeric($amount)) {
throw new InvalidArgumentException("Amount must be numeric");
}
$record = new Page(array('ID' => -1, 'Title' => $controller->Title, 'ParentID' => $controller->ID, 'URLSegment' => $name));
parent::__construct($record);
$this->payable = $payable;
$this->amount = $amount;
//get currency from defaults
$defaults = Payment::config()->defaults;
if (isset($defaults['MoneyCurrency'])) {
$this->currency = $defaults['MoneyCurrency'];
}
$this->successurl = $controller->Link();
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->news_repository = new SapphireNewsRepository();
}
示例4:
function __construct($data = null)
{
parent::__construct($data);
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->news_repository = new SapphireNewsRepository();
$this->manager = new NewsRequestManager(new SapphireNewsRepository(), new SapphireSubmitterRepository(), new NewsFactory(), new NewsValidationFactory(), new SapphireFileUploadService(), SapphireTransactionManager::getInstance());
}
示例6: __construct
/**
* Constructs a new controller for creating a registration.
*
* @param Controller $parent
* @param RegisterableDateTime $datetime
*/
public function __construct($parent, $datetime)
{
$this->parent = $parent;
$this->datetime = $datetime;
parent::__construct($parent->data());
}
示例7: __construct
/**
* SummitVideoApp_Controller constructor.
* @param null $dataRecord
*/
public function __construct($dataRecord = null)
{
parent::__construct($dataRecord);
$this->backend = Injector::inst()->get('SummitVideoAppBackend');
}
示例8: __construct
/**
* @param RequestHandler $parent
* @param string $name
*/
public function __construct($parent, $name)
{
$this->parent = $parent;
$this->name = $name;
parent::__construct();
}
示例9: __construct
public function __construct($parent, $time)
{
$this->parent = $parent;
$this->time = $time;
parent::__construct($parent->data()->customise(array('Title' => $this->Title())));
}
開發者ID:helpfulrobot,項目名稱:ajshort-silverstripe-eventmanagement,代碼行數:6,代碼來源:EventTimeDetailsController.php
示例10: __construct
public function __construct($parent, $registration)
{
$this->parent = $parent;
$this->registration = $registration;
parent::__construct($parent->data()->customise(array('Title' => $this->Title())));
}
開發者ID:helpfulrobot,項目名稱:ajshort-silverstripe-eventmanagement,代碼行數:6,代碼來源:EventRegistrationDetailsController.php