Created
October 9, 2009 03:57
-
-
Save sminnee/205693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the SiteTree by pages awaiting approval | |
* | |
* @package cmsworkflow | |
* @subpackage ThreeStep | |
*/ | |
class CMSWorkflowThreeStepFilters_PagesAwaitingApproval extends CMSSiteTreeFilter { | |
static function title() { | |
return _t('CMSWorkflowThreeStepFilters_PagesAwaitingApproval.TITLE', "Pages awaiting approval"); | |
} | |
function pagesIncluded() { | |
return DB::query('SELECT DISTINCT "SiteTree"."ParentID", "SiteTree"."ID" FROM "SiteTree" | |
INNER JOIN "WorkflowRequest" ON "WorkflowRequest"."PageID" = "SiteTree"."ID" | |
WHERE "WorkflowRequest"."Status" = \'AwaitingApproval\''); | |
} | |
} | |
/** | |
* Fitler the SiteTree by pages awaiting publishing | |
* | |
* @package cmsworkflow | |
* @subpackage ThreeStep | |
*/ | |
class CMSWorkflowThreeStepFilters_PagesAwaitingPublishing extends CMSSiteTreeFilter { | |
static function title() { | |
return _t('CMSWorkflowThreeStepFilters_PagesAwaitingPublishing.TITLE', "Pages awaiting publishing"); | |
} | |
function pagesIncluded() { | |
return DB::query('SELECT DISTINCT "SiteTree"."ParentID", "SiteTree"."ID" FROM "SiteTree" | |
INNER JOIN "WorkflowRequest" ON "WorkflowRequest"."PageID" = "SiteTree"."ID" | |
WHERE "WorkflowRequest"."Status" = \'Approved\''); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment