本文整理汇总了PHP中Brick::contentId方法的典型用法代码示例。如果您正苦于以下问题:PHP Brick::contentId方法的具体用法?PHP Brick::contentId怎么用?PHP Brick::contentId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brick
的用法示例。
在下文中一共展示了Brick::contentId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
<?php
/**
* @package Abricos
* @subpackage News
* @copyright Copyright (C) 2010 Abricos All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @author Alexander Kuzmin (roosit@abricos.org)
*/
$brick = Brick::$builder->brick;
$param = $brick->param;
Abricos::GetModule('news')->GetManager();
$manager = NewsManager::$instance;
$newsid = intval(Abricos::$adress->dir[1]);
$row = $manager->News($newsid, true);
if (empty($row)) {
$brick->content = $brick->param->var['notfound'];
return;
}
$var =& $brick->param->var;
$var['title'] = Brick::ReplaceVar($var['title'], "val", $row['tl']);
$var['date'] = Brick::ReplaceVar($var['date'], "val", $row['dp'] > 0 ? rusDateTime(date($row['dp'])) : $brick->param->var['notpub']);
$var['intro'] = Brick::ReplaceVar($var['intro'], "val", $row['intro']);
$var['body'] = Brick::ReplaceVar($var['body'], "val", $row['body']);
$var['source'] = '';
$var['image'] = '';
if (!empty($row['tl'])) {
Brick::$builder->SetGlobalVar('meta_title', $row['tl']);
}
Brick::$contentId = $row['ctid'];