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
0
 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
0
 /**
  *
  *
  * @return unknown
  */
 function singleEpisode()
 {
     if ($URLID = Director::URLParam('ID')) {
         $EpisodeID = Convert::raw2xml($URLID);
         if (is_numeric($EpisodeID)) {
             return DataObject::get_by_id('PodcastEpisode', $EpisodeID);
         }
     }
 }