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

Version Path
bonethug-0.0.17 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.16 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.15 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.14 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.13 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.12 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.11 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.10 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.7 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.6 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php
bonethug-0.0.5 skel/project_types/silverstripe3/public/abc/code/Tasks/PublishAllPages.php