本文整理汇总了PHP中Content::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Content::init方法的具体用法?PHP Content::init怎么用?PHP Content::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Content
的用法示例。
在下文中一共展示了Content::init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
//se for postado algo ta tentando atualizar... atualiza em silencio
if ($_POST) {
include_once "library/site/modules/content/dao/ContentDemoDAO.class.php";
include_once "library/facil3/core/modules/category/dao/CategoryDAO.class.php";
include_once "library/site/modules/banner/vo/BannerConfigVO.class.php";
$ContentDemoDAO = ContentSiteDAO::getInstance();
$CategoryDAO = CategoryDAO::getInstance();
$CategoryVO = new BannerConfigVO();
$CategoryVO->setId(47, TRUE);
/*
* Array(
[transitionType] => 1
[transitionDelayTimeFixed] => 2
)
*/
//exit();
$CategoryVO->commit();
//exit();
}
$returnResult = parent::init();
$novo_content = array();
foreach ($this->arrayContentsVO as $ContentsVO) {
if ($ContentsVO->active < 2) {
$novo_content[] = $ContentsVO;
}
}
$this->arrayContentsVO = $novo_content;
//$ContentVO->toStdClass(Config::getLocale());
$SelectData = new ContentSelectView($this->arrayContentsVO);
$SelectData->setGoToLocation(array("value" => "admin/home/"));
$SelectData->gerate();
$SelectData->hat["label"] = "Url:";
$SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Description', 'Content', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
$SelectData = $SelectData->getFormData();
$HttpContentResult = $returnResult->getHttpContentResult();
$HttpContentResult->selectData = $SelectData;
$HttpContentResult->category_id = $this->category_id;
$returnResult->setHttpContentResult($HttpContentResult);
$HttpResult = $returnResult;
//para o botao de inserir
$HttpContentResult->url_insert = Config::getRootPath("admin/home/insert/");
//include (Config::getFolderView( 'admin/home/index.php' )) ;
//exit() ;
//print_r($returnResult);exit();
return $returnResult;
}
示例2: init
public function init()
{
$returnResult = parent::init();
//$ContentVO->toStdClass(Config::getLocale());
$SelectData = new ContentSelectView($this->arrayContentsVO);
$SelectData->setGoToLocation(array("value" => "admin/menu_top"));
$SelectData->gerate();
$SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Hat', 'Description', 'Content', 'Author', 'TemplateUrl', 'Slug', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
$SelectData = $SelectData->getFormData();
$HttpContentResult = $returnResult->getHttpContentResult();
$HttpContentResult->selectData = $SelectData;
$returnResult->setHttpContentResult($HttpContentResult);
$HttpResult = $returnResult;
//para o botao de inserir
$HttpContentResult->url_insert = Config::getRootPath("admin/menu_top/insert/");
include Config::getFolderView('admin/content/select.php');
exit;
//print_r($returnResult);exit();
return $returnResult;
}
示例3: init
public function init()
{
if ($this->sub == "blog") {
$returnResult = parent::init("id", " DESC ");
} else {
$returnResult = parent::init();
}
//blog é id 36
//$ContentVO->toStdClass(Config::getLocale());
//Debug::print_r($this->arrayRestFolder[1]);exit();
$SelectData = new ContentSelectView($this->arrayContentsVO);
$SelectData->setGoToLocation(array("value" => "admin/page"));
$SelectData->gerate();
$SelectData->setMassiveAttr('visible', FALSE, array('Name', 'Hat', 'Description', 'Content', 'Author', 'TemplateUrl', 'KeyWords', 'Date', 'DateIn', 'DateOut', 'Order'));
$SelectData->title["label"] = "Titulo:";
$SelectData->slug["label"] = "Url:";
$SelectData->slug["type"] = "url_local";
//faz com que mostre a config::getRootPatc + url
$SelectData = $SelectData->getFormData();
$HttpContentResult = $returnResult->getHttpContentResult();
$HttpContentResult->selectData = $SelectData;
$returnResult->setHttpContentResult($HttpContentResult);
$HttpResult = $returnResult;
$HttpContentResult->sub = $this->sub;
//para o botao de inserir
$HttpContentResult->url_insert = Config::getRootPath("admin/page/insert/{$this->sub}");
$content_sub = Config::getFolderView("admin/content/{$this->sub}/select.php");
if (file_exists($content_sub)) {
include $content_sub;
exit;
}
include Config::getFolderView('admin/content/select.php');
exit;
//print_r($returnResult);exit();
return $returnResult;
}
示例4: show
public function show()
{
$HttpReturn = parent::init();
$contentResult = $HttpReturn->getHttpContentResult();
//se enviado /pdf_burn.1/ na url ele atualiza o pdf de todos os produtos
if (DataHandler::getValueByArrayIndex($this->arrayVariable, "pdf_burn")) {
set_time_limit(0);
foreach ($contentResult->arrayContentsVO as $ContentVO) {
$this->updatePdf($ContentVO->id);
}
}
return $HttpReturn;
}
示例5: show
public function show()
{
return parent::init();
}
示例6: show
public function show()
{
$HttpReturn = parent::init();
$contentResult = $HttpReturn->getHttpContentResult();
//se enviado /pdf_burn.1/ na url ele atualiza o pdf de todos os produtos
if (DataHandler::getValueByArrayIndex($this->arrayVariable, "pdf_burn")) {
foreach ($contentResult->arrayContentsVO as $ContentVO) {
if (!file_exists("upload/pdf/" . $ContentVO->id . "/" . $ContentVO->slug . ".pdf")) {
//Debug::print_r($ContentVO);
//die;
$this->updatePdf($ContentVO->id);
}
}
}
return $HttpReturn;
}