本文整理汇总了PHP中Ibos::getCurrentModuleName方法的典型用法代码示例。如果您正苦于以下问题:PHP Ibos::getCurrentModuleName方法的具体用法?PHP Ibos::getCurrentModuleName怎么用?PHP Ibos::getCurrentModuleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ibos
的用法示例。
在下文中一共展示了Ibos::getCurrentModuleName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getModule
public function getModule()
{
if ($this->_module !== null) {
return $this->_module;
} else {
return Ibos::getCurrentModuleName();
}
}
示例2: getView
public static function getView($view)
{
$currentController = Yii::app()->getController();
$basePath = "application.modules.vote.views.default.";
$relatedModule = Ibos::getCurrentModuleName();
$relatedId = EnvUtil::getRequest($relatedModule . "id");
if ($view == "articleView") {
$voteData = Vote::model()->fetchVote($relatedModule, $relatedId);
$votes = VoteUtil::processVoteData($voteData);
if (!empty($votes)) {
$voteItemList = $votes["voteItemList"];
$voteType = $voteItemList[0]["type"];
if ($voteType == 1) {
$view = "articleTextView";
} elseif ($voteType == 2) {
$view = "articleImageView";
}
$selectView = $basePath . $view;
$votePeopleNumber = Vote::model()->fetchUserVoteCount($relatedModule, $relatedId);
$userHasVote = VoteUtil::checkVote($relatedModule, $relatedId);
$mothedName = "get" . ucfirst($relatedModule) . "Vote";
$voteStatus = ICVotePlugManager::$mothedName()->getStatus($relatedModule, $relatedId, $votes["vote"]);
$votes["vote"]["subject"] = StringUtil::cutStr($votes["vote"]["subject"], 60);
$data = array("voteData" => $votes, "votePeopleNumber" => $votePeopleNumber, "userHasVote" => $userHasVote, "voteStatus" => $voteStatus, "attachUrl" => Yii::app()->setting->get("setting/attachurl"));
if ($voteStatus == 2) {
$partView = null;
} else {
$partView = $currentController->renderPartial($selectView, $data, true);
}
} else {
$partView = null;
}
} elseif ($view == "articleAdd") {
$selectView = $basePath . $view;
$partView = $currentController->renderPartial($selectView, array("uploadConfig" => AttachUtil::getUploadConfig()), true);
} elseif ($view == "articleEdit") {
$selectView = $basePath . $view;
$voteData = Vote::model()->fetchVote($relatedModule, $relatedId);
if (!empty($voteData) && isset($voteData["voteItemList"])) {
foreach ($voteData["voteItemList"] as $k => $voteItem) {
$voteData["voteItemList"][$k]["thumburl"] = FileUtil::fileName($voteItem["picpath"]);
}
}
$data = array("voteData" => $voteData, "uploadConfig" => AttachUtil::getUploadConfig());
$partView = $currentController->renderPartial($selectView, $data, true);
}
return $partView;
}
示例3: getAssetUrl
public function getAssetUrl($module = "")
{
if (empty($this->_assetUrl)) {
if (empty($module)) {
$module = Ibos::getCurrentModuleName();
}
$this->_assetUrl = Ibos::app()->assetManager->getAssetsUrl($module);
}
return $this->_assetUrl;
}