Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
colintucker committed Dec 11, 2017
2 parents e283fcf + a137f13 commit 24f8d9b
Show file tree
Hide file tree
Showing 45 changed files with 480 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/Components/AreaComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ class AreaComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/AreaComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_AreaComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
24 changes: 24 additions & 0 deletions src/Components/BaseComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@
*/
class BaseComponent extends Component
{
/**
* Human-readable singular name.
*
* @var string
* @config
*/
private static $singular_name = 'Base Component';

/**
* Human-readable plural name.
*
* @var string
* @config
*/
private static $plural_name = 'Base Components';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand All @@ -41,6 +57,14 @@ class BaseComponent extends Component
*/
private static $hide_ancestor = Component::class;

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_BaseComponent';

/**
* Maps field names to field types for this object.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/BaseListComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ class BaseListComponent extends BaseComponent
const BUTTON_TYPE_LINK = 'link';
const BUTTON_TYPE_BUTTON = 'button';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_BaseListComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/ContentComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ class ContentComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/ContentComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_ContentComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/CopyrightComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ class CopyrightComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/CopyrightComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_CopyrightComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/DeveloperComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ class DeveloperComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/DeveloperComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_DeveloperComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/FeatureComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ class FeatureComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/FeatureComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_FeatureComponent';

/**
* Maps field names to field types for this object.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/HeadingComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ class HeadingComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/HeadingComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_HeadingComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/ImageComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ class ImageComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/ImageComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_ImageComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/ListComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ class ListComponent extends BaseListComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/ListComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_ListComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/MediaComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ class MediaComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/MediaComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_MediaComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/PageComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ class PageComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/PageComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_PageComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/ScrollToTopButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ class ScrollToTopButton extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/ScrollToTopButton.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_ScrollToTopButton';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/TableComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ class TableComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/TableComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_TableComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/TagCloudComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ class TagCloudComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/TagCloudComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_TagCloudComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Components/TileComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,12 @@ class TileComponent extends BaseListComponent
* @config
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/TileComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_TileComponent';
}
8 changes: 8 additions & 0 deletions src/Components/TitleComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ class TitleComponent extends BaseComponent
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/TitleComponent.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_TitleComponent';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
24 changes: 24 additions & 0 deletions src/Core/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,30 @@
*/
class App extends DataObject
{
/**
* Human-readable singular name.
*
* @var string
* @config
*/
private static $singular_name = 'App';

/**
* Human-readable plural name.
*
* @var string
* @config
*/
private static $plural_name = 'Apps';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_App';

/**
* Defines the injector dependencies for this object.
*
Expand Down
6 changes: 5 additions & 1 deletion src/Dev/FixtureBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function findOrMakeObject($identifier, $data = null, $fixtures = null, $f

// Mutate Class (if required):

$this->mutateClass($object, $identifier, $data);
$object = $this->mutateClass($object, $identifier, $data);

// Write Object to Database:

Expand Down Expand Up @@ -255,6 +255,10 @@ public function findObjects($identifier, $data, $filter)
{
$objects = DataList::create($this->getClass());

if (!$objects->exists()) {
$objects = DataList::create($this->getBaseClass());
}

if (is_array($filter)) {
$objects = $objects->filter($filter);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Extensions/Model/URLSegmentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function onBeforeWrite()
{
// Generate Valid URL Segment:

$this->generateValidURLSegment($this->getURLSegmentSource());
$this->owner->generateValidURLSegment($this->owner->getURLSegmentSource());
}

/**
Expand Down Expand Up @@ -135,13 +135,13 @@ public function generateValidURLSegment($string)
{
// Generate URL Segment:

$this->owner->URLSegment = $this->generateURLSegment($string);
$this->owner->URLSegment = $this->owner->generateURLSegment($string);

// Check for Duplicates:

$count = 2;

while (!$this->validURLSegment()) {
while (!$this->owner->validURLSegment()) {

$this->owner->URLSegment = sprintf(
'%s-%d',
Expand Down
24 changes: 24 additions & 0 deletions src/Folders/ComponentFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@
*/
class ComponentFolder extends Folder
{
/**
* Human-readable singular name.
*
* @var string
* @config
*/
private static $singular_name = 'Component Folder';

/**
* Human-readable plural name.
*
* @var string
* @config
*/
private static $plural_name = 'Component Folders';

/**
* Description of this object.
*
Expand All @@ -47,6 +63,14 @@ class ComponentFolder extends Folder
*/
private static $icon = 'silverware/silverware: admin/client/dist/images/icons/ComponentFolder.png';

/**
* Defines the table name to use for this object.
*
* @var string
* @config
*/
private static $table_name = 'SilverWare_ComponentFolder';

/**
* Defines an ancestor class to hide from the admin interface.
*
Expand Down
Loading

0 comments on commit 24f8d9b

Please sign in to comment.