本文整理汇总了PHP中Page::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::__construct方法的具体用法?PHP Page::__construct怎么用?PHP Page::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page
的用法示例。
在下文中一共展示了Page::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($model)
{
parent::__construct($model);
// Get the deals for this page
$this->totalPages = $this->model->howManyPages();
$this->deals = $this->model->getSomeDeals();
}
示例2: array
function __construct($message = null)
{
parent::__construct();
$this->setTitle(Messages::getString('LoginPage.Title'));
$this->menu = array(Messages::getString('General.Home') => "index.php") + $this->menu;
$this->message = $message;
}
示例3:
function __construct($id, $language = false)
{
parent::__construct($id, $language);
$this->suggestName('Book', 'en');
$this->suggestName('Bokning', 'sv');
$this->alias = 'book';
}
示例4: array
function __construct($message = null)
{
parent::__construct();
$this->setTitle("Administration-Login");
$this->menu = array("Home" => "index.php") + $this->menu;
$this->message = $message;
}
示例5: array
function __construct()
{
parent::__construct();
$this->session = Session::getInstance();
$this->project = $this->session->getProject();
$this->menu = array("Logout" => "logout.php") + $this->menu;
}
示例6: __construct
public function __construct($title = '')
{
parent::__construct($title);
$furniture_slider = Db_Sliders::getSliderByKey('furniture-slider');
$furniture_v1_banner = Db_Banners::getBannerByKey('home_page_sidebar_top');
$furniture_v2_banner = Db_Banners::getBannerByKey('home_page_sidebar_bottom');
$furniture_banner_left = Db_Banners::getBannerByKey('banner_left');
$furniture_banner_middle = Db_Banners::getBannerByKey('banner_middle');
$furniture_banner_right = Db_Banners::getBannerByKey('banner_right');
$furniture_banner_mimi_left = Db_Banners::getBannerByKey('banner_mimi_left');
$furniture_banner_mimi_right = Db_Banners::getBannerByKey('banner_mimi_right');
$headphones['new'] = Db_Products::getProductsByOptionsKey('new', 1, 'headphone');
$headphones['color'] = Db_Products::getProductsByOptionsKey('color', '', 'headphone');
$ebooks['new'] = Db_Products::getProductsByOptionsKey('new', 1, 'ebook');
$ebooks['color'] = Db_Products::getProductsByOptionsKey('color', '', 'ebook');
$brands = Db_Brand::getAllWithTransFiltered();
$this->TPL->assign('furniture_v1_banner', $furniture_v1_banner);
$this->TPL->assign('furniture_v2_banner', $furniture_v2_banner);
$this->TPL->assign('furniture_banner_left', $furniture_banner_left);
$this->TPL->assign('furniture_banner_middle', $furniture_banner_middle);
$this->TPL->assign('furniture_banner_right', $furniture_banner_right);
$this->TPL->assign('furniture_banner_mimi_left', $furniture_banner_mimi_left);
$this->TPL->assign('furniture_banner_mimi_right', $furniture_banner_mimi_right);
$this->TPL->assign('furniture_slider', $furniture_slider);
$this->TPL->assign('headphones', $headphones);
$this->TPL->assign('ebooks', $ebooks);
$this->TPL->assign('ebooks', $ebooks);
$this->TPL->assign('brands', $brands);
}
示例7: array
function __construct()
{
parent::__construct();
$this->setTitle(Messages::getString('SetupPage.Title'));
$this->menu = array(Messages::getString('General.Admin') => "admin.php") + $this->menu;
$this->menu = array(Messages::getString('General.Home') => "index.php") + $this->menu;
$this->menu = array(Messages::getString('CreateProjectPage.NewProject') => "create_project.php") + $this->menu;
//Set absolute basedir
$this->BASEDIR = dirname(dirname(__FILE__));
// Check, if transmitted master password is correct
if (Config::$master_password) {
$check = $this->CheckPostMasterPassword();
if (check !== null && $check === false) {
$this->error = Messages::getString('CreateProjectPage.MasterPasswordWrong');
}
$this->master_password_correct = $check;
}
// process transmitted form
if ((!Config::$master_password || $this->CheckPostMasterPassword()) && isset($_POST['setup'])) {
$this->error = $this->processForm();
if (!$this->error) {
header("Location: " . $this->SUCCESS_REDIRECT_PAGE);
//Redirect to create_project, if succeeded
}
}
}
示例8: __construct
public function __construct($title)
{
Page::__construct($title);
$ObjectDetails = Db_Admin::getObjectDetails($this->Id);
// Build breadcrumb
$this->BreadCrumb[1]['link'] = $this->PageUrl;
$this->BreadCrumb[1]['title'] = $this->_T('nav_administrators');
switch ($this->Action) {
case 'edit':
$this->BreadCrumb[2]['title'] = $ObjectDetails->login;
$this->BreadCrumb[2]['link'] = $this->PageUrl . '?action=view&id=' . $this->Id;
$this->BreadCrumb[3]['title'] = $this->_T('edit');
break;
case 'editpassword':
$this->BreadCrumb[2]['link'] = $this->PageUrl . '?action=view&id=' . $this->Id;
$this->BreadCrumb[2]['title'] = $ObjectDetails->login;
$this->BreadCrumb[3]['title'] = $this->_T('edit') . ' ' . _T('password');
break;
case 'add':
$this->BreadCrumb[2]['title'] = $this->_T('add');
break;
case 'view':
$this->BreadCrumb[2]['title'] = $ObjectDetails->login;
break;
default:
}
}
示例9: __construct
public function __construct()
{
// The array is the list of template files we're going to
// include on this page. there is an optional parameter for the
// theme we're going to use
parent::__construct(array('404error'));
}
示例10: __construct
public function __construct($title = '')
{
parent::__construct($title);
$categories = Db_Category::getAllObjectsWithTrans();
$products = array();
$products['new'] = Db_Product::getProducts('new');
$products['sale'] = Db_Product::getProducts('sale');
$products['featured'] = Db_Product::getProducts('featured');
$products['hot_deals'][] = Db_Product::getProducts('hot_deals', 1);
$products['hot_deals'][] = Db_Product::getProducts('hot_deals', 4);
$products['hot_deals'][] = Db_Product::getProducts('hot_deals', 7);
$products['apple'] = Db_Product::getProductsByBrandId(8, 3);
$products['gamers'] = Db_Product::getProductsByCategoryId(5, 3);
$products['style'] = Db_Product::getProductsByCategoryId(3, 3);
$products['sport'] = Db_Product::getProductsByCategoryId(2);
$banners['172X170'] = Db_Banners::getBannerBySize('172X170', 1);
$banners['180X170'] = Db_Banners::getBannerBySize('180X170', 1);
$banners['270X337'] = Db_Banners::getBannerBySize('270X337', 3);
$banners['270X320'] = Db_Banners::getBannerBySize('270X320', 1);
$banners['470X158'] = Db_Banners::getBannerBySize('470X158', 1);
$banners['370X158'] = Db_Banners::getBannerBySize('370X158', 1);
$banners['870X160'] = Db_Banners::getBannerBySize('870X160', 1);
$slider = Db_Slider::getForFrontend();
$this->TPL->assign('banners', $banners);
$this->TPL->assign('categories', $categories);
$this->TPL->assign('slider', $slider);
$this->TPL->assign('products', $products);
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->load->library('towing/Dossier_service');
$this->load->library('towing/Invoice_service');
$this->load->library('table');
}
示例12:
function __construct($id)
{
parent::__construct($id);
$this->icon = 'small/bricks';
$this->suggestName('Subdomains', 'en');
$this->suggestName('Subdomäner', 'sv');
}
示例13:
function __construct($url)
{
parent::__construct($url);
$this->tag = @$_REQUEST['tag'];
// find all blog items
$this->pages = Resolver::find_all_pages('blog');
}
示例14: elseif
/**
* The class is loaded either with an id (from the spine table) or the path to the file
* In the first case, when it is beeing loaded from the Controller, $parent actually contains the alias
* of the file itself.
* The function cascades the __construct call to it's parent
* @param mixed $fullpath Contains id or path
* @param mixed $parent Contains (possibly) parent folder
* @return void
*/
function __construct($fullpath = false, $parent = false)
{
global $DB, $Controller, $CONFIG;
$id = false;
if (is_numeric($fullpath)) {
$id = $fullpath;
} else {
if ($parent === false) {
if ($fullpath === $this->rootDir()) {
$id = $Controller->fileRoot(OVERRIDE)->ID;
} elseif (substr($fullpath, 0, strlen($this->rootDir())) == $this->rootDir()) {
$parent = Folder::open(dirname($fullpath));
} else {
return false;
}
$this->_path = $fullpath;
}
if (!$id) {
if (!($id = $DB->files->getCell(array('parent' => $parent === 0 ? 0 : $parent->ID, 'name' => pathinfo($fullpath, PATHINFO_BASENAME)), 'id'))) {
$id = $DB->spine->insert(array('class' => $this->Type));
$DB->files->insert(array('parent' => $parent === 0 ? 0 : $parent->ID, 'name' => pathinfo($fullpath, PATHINFO_BASENAME), 'id' => $id));
}
}
}
parent::__construct($id);
if ($this->isImage()) {
$this->editable['ImageEditor'] = EDIT;
}
Short::registerFilter(array(__CLASS__, 'contentFilter'));
}
示例15: __construct
public function __construct($model)
{
parent::__construct($model);
// Get info for the deal ID in the address bar
$this->dealInfo = $this->model->getDealInfo();
$this->dealTags = $this->model->getDealTags();
}