本文整理匯總了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;
}