本文整理汇总了PHP中Director::URLParam方法的典型用法代码示例。如果您正苦于以下问题:PHP Director::URLParam方法的具体用法?PHP Director::URLParam怎么用?PHP Director::URLParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Director
的用法示例。
在下文中一共展示了Director::URLParam方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setStepConfig
function setStepConfig()
{
$whichStep = Director::URLParam("ID");
$validSteps = array('twostep', 'threestep');
if (!in_array($whichStep, $validSteps)) {
return false;
}
CMSWorkflowSiteConfigDecorator::set_step_config($whichStep);
echo "<p>CMS Workflow has been set to <strong>{$whichStep}</strong></p>";
// rebuild the database schema
Director::redirect("dev/build?flush=1");
return true;
}
示例2: photo
public function photo()
{
$tagValue = Director::URLParam('ID');
$this->Title = "Photos tagged '" . $tagValue . "'";
$tag = DataObject::get_one('Tag', "Value='" . $tagValue . "'");
$this->TagValue = $tagValue;
$this->Tag = $tag;
$result = array();
if ($tag) {
$result = $tag->FlickrPhotos();
$this->FlickrPhotos = $tag->FlickrPhotos();
}
return array();
}
示例3: singleEpisode
/**
*
*
* @return unknown
*/
function singleEpisode()
{
if ($URLID = Director::URLParam('ID')) {
$EpisodeID = Convert::raw2xml($URLID);
if (is_numeric($EpisodeID)) {
return DataObject::get_by_id('PodcastEpisode', $EpisodeID);
}
}
}