mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Apply SilverStripe\Admin namespace
This commit is contained in:
parent
095ae30a3e
commit
2352127fe0
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use SilverStripe\Admin\CMSMenu;
|
||||
|
||||
/**
|
||||
* - CMS_DIR: Path relative to webroot, e.g. "cms"
|
||||
* - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms"
|
||||
|
@ -7,7 +7,8 @@ use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\ORM\Versioning\Versioned;
|
||||
use SilverStripe\Security\Permission;
|
||||
use CMSBatchAction;
|
||||
use SilverStripe\Admin\CMSBatchAction;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -9,7 +9,6 @@ use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\Security\Security;
|
||||
use SilverStripe\Security\PermissionProvider;
|
||||
use LeftAndMain;
|
||||
use Session;
|
||||
use Requirements;
|
||||
use CMSBatchActionHandler;
|
||||
@ -51,6 +50,10 @@ use Injector;
|
||||
use Director;
|
||||
use ArrayData;
|
||||
use CMSBatchAction;
|
||||
use SilverStripe\Admin\CMSBatchActionHandler;
|
||||
use SilverStripe\Admin\LeftAndMain;
|
||||
use SilverStripe\Admin\CMSBatchAction;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace SilverStripe\CMS\Controllers;
|
||||
|
||||
use ResetFormAction;
|
||||
use SilverStripe\Admin\CMSPreviewable;
|
||||
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\ORM\Versioning\Versioned;
|
||||
@ -16,7 +17,10 @@ use SilverStripe\Security\Security;
|
||||
use SilverStripe\Security\SecurityToken;
|
||||
use SilverStripe\Security\Permission;
|
||||
use SilverStripe\Security\PermissionProvider;
|
||||
use LeftAndMain;
|
||||
use SilverStripe\Admin\CMSBatchActionHandler;
|
||||
use SilverStripe\Admin\AdminRootController;
|
||||
use SilverStripe\Admin\AddToCampaignHandler;
|
||||
use SilverStripe\Admin\LeftAndMain;
|
||||
|
||||
|
||||
use SS_HTTPRequest;
|
||||
@ -734,7 +738,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
$form->setValidationExemptActions(array('restore', 'revert', 'deletefromlive', 'delete', 'unpublish', 'rollback', 'doRollback'));
|
||||
|
||||
// Announce the capability so the frontend can decide whether to allow preview or not.
|
||||
if(in_array('CMSPreviewable', class_implements($record))) {
|
||||
if ($record instanceof CMSPreviewable) {
|
||||
$form->addExtraClass('cms-previewable');
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,10 @@ use SilverStripe\ORM\DataList;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\ORM\Versioning\Versioned;
|
||||
use Object;
|
||||
use LeftAndMain_SearchFilter;
|
||||
use ClassInfo;
|
||||
use DateField;
|
||||
use SilverStripe\Admin\LeftAndMain_SearchFilter;
|
||||
|
||||
|
||||
/**
|
||||
* Base class for filtering the subtree for certain node statuses.
|
||||
|
@ -9,10 +9,11 @@ use SilverStripe\ORM\Versioning\Versioned;
|
||||
use SilverStripe\ORM\FieldType\DBField;
|
||||
use SilverStripe\Security\Member;
|
||||
use ViewableData;
|
||||
use CMSPreviewable;
|
||||
use ClassInfo;
|
||||
use LeftAndMain;
|
||||
use Controller;
|
||||
use SilverStripe\Admin\CMSPreviewable;
|
||||
use SilverStripe\Admin\LeftAndMain;
|
||||
|
||||
|
||||
use SiteTreeFutureState;
|
||||
use SilverStripe\CMS\Model\RedirectorPage;
|
||||
|
@ -19,7 +19,6 @@ use SilverStripe\Security\Permission;
|
||||
use SilverStripe\Security\Group;
|
||||
use SilverStripe\Security\PermissionProvider;
|
||||
use i18nEntityProvider;
|
||||
use CMSPreviewable;
|
||||
use Director;
|
||||
use SilverStripe\CMS\Controllers\RootURLController;
|
||||
use ClassInfo;
|
||||
@ -52,9 +51,11 @@ use TreeDropdownField;
|
||||
use FieldGroup;
|
||||
use CheckboxField;
|
||||
use ListboxField;
|
||||
use AddToCampaignHandler_FormAction;
|
||||
use FormAction;
|
||||
use i18n;
|
||||
use SilverStripe\Admin\AddToCampaignHandler_FormAction;
|
||||
use SilverStripe\Admin\CMSPreviewable;
|
||||
|
||||
|
||||
/**
|
||||
* Basic data-object representing all pages within the site tree. All page types that live within the hierarchy should
|
||||
@ -1467,7 +1468,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
}
|
||||
|
||||
if(Permission::check('CMS_ACCESS_CMSMain')
|
||||
&& in_array('CMSPreviewable', class_implements($this))
|
||||
&& !$this instanceof ErrorPage
|
||||
&& $this->ID > 0
|
||||
) {
|
||||
|
@ -6,6 +6,8 @@ use SilverStripe\ORM\Versioning\Versioned;
|
||||
use SilverStripe\ORM\HiddenClass;
|
||||
use SilverStripe\CMS\Controllers\CMSMain;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Admin\CMSBatchActionHandler;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user