Skip to content

Commit

Permalink
API Use new names for renamed classes (silverstripe#1254)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Sep 23, 2024
1 parent 34d349b commit d8e0e3b
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/Controllers/ElementSiteTreeFilterSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use SilverStripe\Core\Config\Configurable;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\DateField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataList;

class ElementSiteTreeFilterSearch extends CMSSiteTreeFilter_Search
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/ElementalAreaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Security\SecurityToken;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Core\Validation\ValidationResult;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\FieldList;
use SilverStripe\Control\Controller;
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/ElementalAreaUsedOnTableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Core\Validation\ValidationException;
use DNADesign\Elemental\Models\ElementalArea;
use DNADesign\Elemental\Models\BaseElement;
use SilverStripe\Admin\Forms\UsedOnTable;
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/ElementalAreasExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\RelatedData\StandardRelatedDataService;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ViewableData;
use SilverStripe\Model\ModelData;
use SilverStripe\Core\Extension;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Extensions/TopPageElementExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use SilverStripe\Core\ClassInfo;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\Queries\SQLUpdate;
use SilverStripe\ORM\ValidationException;
use SilverStripe\View\ViewableData;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Model\ModelData;
use SilverStripe\Forms\FieldList;
use SilverStripe\Core\Extension;

Expand Down Expand Up @@ -320,7 +320,7 @@ protected function getTopPageTable(): string
// Find the first ancestor table which has the extension applied
// Note that this extension is expected to be subclassed
foreach ($classes as $class) {
if (!ViewableData::has_extension($class, static::class)) {
if (!ModelData::has_extension($class, static::class)) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/TopPageSiteTreeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use DNADesign\Elemental\Extensions\ElementalPageExtension;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Core\Extension;

/**
Expand Down
24 changes: 12 additions & 12 deletions src/Models/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
use SilverStripe\ORM\FieldType\DBBoolean;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Versioned\Versioned;
use SilverStripe\VersionedAdmin\Forms\HistoryViewerField;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use SilverStripe\View\Parsers\URLSegmentFilter;
use SilverStripe\View\Requirements;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\Core\Config\Config;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Core\Validation\ValidationResult;
use SilverStripe\Dev\Deprecation;

/**
Expand Down Expand Up @@ -693,7 +693,7 @@ public function getSimpleClassName()
*
* @return null|DataObject
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function getPage()
{
Expand Down Expand Up @@ -794,7 +794,7 @@ public function getAnchorsInContent(): array
* @param string|null $action
* @return string|null
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function AbsoluteLink($action = null)
{
Expand All @@ -814,7 +814,7 @@ public function AbsoluteLink($action = null)
* @param string|null $action
* @return string|null
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function Link($action = null)
{
Expand All @@ -834,7 +834,7 @@ public function Link($action = null)
* @param string|null $action
* @return string|null
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function PreviewLink($action = null)
{
Expand Down Expand Up @@ -877,7 +877,7 @@ public function isCMSPreview()
* @param bool $directLink Indicates that the GridFieldDetailEdit form link should be given even if the block can be
* edited in-line.
* @return null|string
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function getCMSEditLink($directLink = false): ?string
{
Expand Down Expand Up @@ -954,7 +954,7 @@ private function getElementCMSLink(bool $directLink)
*
* @return int|string The name of a valid elemental area relation
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function getAreaRelationName()
{
Expand Down Expand Up @@ -1008,7 +1008,7 @@ public function unsanitiseClassName($class, $delimiter = '-')
/**
* @return null|string
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function getEditLink()
{
Expand All @@ -1018,7 +1018,7 @@ public function getEditLink()
/**
* @return DBField|null
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function PageCMSEditLink()
{
Expand Down Expand Up @@ -1199,7 +1199,7 @@ public function getStyleVariant()
/**
* @return mixed|null
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function getPageTitle()
{
Expand Down
12 changes: 6 additions & 6 deletions src/Models/ElementalArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\HasManyList;
use SilverStripe\ORM\UnsavedRelationList;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ViewableData;
use SilverStripe\Model\ModelData;

/**
* Class ElementalArea
Expand Down Expand Up @@ -82,7 +82,7 @@ public function supportedPageTypes()
$elementalClasses = [];

foreach (ClassInfo::getValidSubClasses(DataObject::class) as $class) {
if (ViewableData::has_extension($class, ElementalAreasExtension::class)) {
if (ModelData::has_extension($class, ElementalAreasExtension::class)) {
$elementalClasses[] = $class;
}
}
Expand Down Expand Up @@ -185,7 +185,7 @@ public function ElementControllers()
/**
* @return null|DataObject
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function getOwnerPage()
{
Expand Down Expand Up @@ -273,7 +273,7 @@ public function getOwnerPage()
* @param null $member
* @return bool
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function canEdit($member = null)
{
Expand All @@ -293,7 +293,7 @@ public function canEdit($member = null)
* @param null $member
* @return bool
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SilverStripe\ORM\ValidationException
* @throws \SilverStripe\Core\Validation\ValidationException
*/
public function canView($member = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Reports/ElementTypeReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\Reports\Report;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use SilverStripe\View\Requirements;

class ElementTypeReport extends Report
Expand Down
2 changes: 1 addition & 1 deletion src/Reports/ElementsInUseReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\ORM\DataList;
use SilverStripe\Reports\Report;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use SilverStripe\View\Requirements;

class ElementsInUseReport extends Report
Expand Down
2 changes: 1 addition & 1 deletion tests/Blocks/TestElementContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SilverStripe\Dev\TestOnly;
use DNADesign\Elemental\Models\ElementContent;
use SilverStripe\Forms\CompositeValidator;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Core\Validation\ValidationResult;
use SilverStripe\Forms\Validator;

class TestElementContent extends ElementContent implements TestOnly
Expand Down
2 changes: 1 addition & 1 deletion tests/ElementalAreaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use DNADesign\Elemental\Tests\Src\TestPage;
use Page;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\Versioned\Versioned;

class ElementalAreaTest extends SapphireTest
Expand Down
2 changes: 1 addition & 1 deletion tests/Src/ValidationFailedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Extension;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Core\Validation\ValidationResult;

class ValidationFailedExtension extends Extension implements TestOnly
{
Expand Down

0 comments on commit d8e0e3b

Please sign in to comment.