Sha256: 0a4d7584c3b628d2f6a0578183bf15c50751748d0e0c1d3b127b33f8c4b0ddc3
Contents?: true
Size: 639 Bytes
Versions: 11
Compression:
Stored size: 639 Bytes
Contents
<?php class PublishAllPages extends BuildTask { protected $title = 'Publish all Pages'; protected $description = 'Publish all Pages'; protected $enabled = true; /** * Run the task, and do the business * * @param SS_HTTPRequest $httpRequest */ function run($httpRequest) { echo 'running publish all pages task...'; $pages = DataObject::get('Page'); foreach($pages as $page){ $page->doPublish(); echo "published ".$page->Title."<br />"; } $pages = DataObject::get('Album'); foreach($pages as $page){ $page->doPublish(); echo "published ".$page->Title."<br />"; } echo 'finished'; } }
Version data entries
11 entries across 11 versions & 1 rubygems