Skip to content

Commit

Permalink
Merge pull request #2023 from Daniel-KM/feature/scalar_fields_more
Browse files Browse the repository at this point in the history
Feature/scalar fields more
  • Loading branch information
zerocrates authored Apr 13, 2023
2 parents 865f6c5 + f9b55fe commit 8d26c94
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 0 deletions.
10 changes: 10 additions & 0 deletions application/src/Api/Adapter/AssetAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ class AssetAdapter extends AbstractEntityAdapter
'extension' => 'extension',
];

protected $scalarFields = [
'id' => 'id',
'media_type' => 'mediaType',
'name' => 'name',
'extension' => 'extension',
'storage_id' => 'storageId',
'alt_text' => 'altText',
'owner' => 'owner',
];

public function getResourceName()
{
return 'assets';
Expand Down
10 changes: 10 additions & 0 deletions application/src/Api/Adapter/JobAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ class JobAdapter extends AbstractEntityAdapter
'ended' => 'ended',
];

protected $scalarFields = [
'id' => 'id',
// 'pid' => 'pid',
'status' => 'status',
'class' => 'class',
'started' => 'started',
'ended' => 'ended',
'owner' => 'owner',
];

public function getResourceName()
{
return 'jobs';
Expand Down
9 changes: 9 additions & 0 deletions application/src/Api/Adapter/PropertyAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ class PropertyAdapter extends AbstractEntityAdapter
'comment' => 'comment',
];

protected $scalarFields = [
'id' => 'id',
'local_name' => 'localName',
'label' => 'label',
'comment' => 'comment',
'owner' => 'owner',
'vocabulary' => 'vocabulary',
];

public function getResourceName()
{
return 'properties';
Expand Down
9 changes: 9 additions & 0 deletions application/src/Api/Adapter/ResourceClassAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ class ResourceClassAdapter extends AbstractEntityAdapter
'comment' => 'comment',
];

protected $scalarFields = [
'id' => 'id',
'local_name' => 'localName',
'label' => 'label',
'comment' => 'comment',
'owner' => 'owner',
'vocabulary' => 'vocabulary',
];

public function getResourceName()
{
return 'resource_classes';
Expand Down
9 changes: 9 additions & 0 deletions application/src/Api/Adapter/ResourceTemplateAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ class ResourceTemplateAdapter extends AbstractEntityAdapter
'label' => 'label',
];

protected $scalarFields = [
'id' => 'id',
'label' => 'label',
'owner' => 'owner',
'resource_class' => 'resourceClass',
'title_property' => 'titleProperty',
'description_property' => 'descriptionProperty',
];

public function getResourceName()
{
return 'resource_templates';
Expand Down
14 changes: 14 additions & 0 deletions application/src/Api/Adapter/SiteAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ class SiteAdapter extends AbstractEntityAdapter
'slug' => 'slug',
];

protected $scalarFields = [
'id' => 'id',
'slug' => 'slug',
'theme' => 'theme',
'title' => 'title',
'is_public' => 'isPublic',
'created' => 'created',
'modified' => 'modified',
'homepage' => 'homepage',
'owner' => 'owner',
'summary' => 'summary',
'thumbnail' => 'thumbnail',
];

public function getResourceName()
{
return 'sites';
Expand Down
10 changes: 10 additions & 0 deletions application/src/Api/Adapter/SitePageAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ class SitePageAdapter extends AbstractEntityAdapter implements FulltextSearchabl
'slug' => 'slug',
];

protected $scalarFields = [
'id' => 'id',
'slug' => 'slug',
'title' => 'title',
'is_public' => 'isPublic',
'site' => 'site',
'created' => 'created',
'modified' => 'modified',
];

public function getResourceName()
{
return 'site_pages';
Expand Down
10 changes: 10 additions & 0 deletions application/src/Api/Adapter/UserAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ class UserAdapter extends AbstractEntityAdapter
'role' => 'role',
];

protected $scalarFields = [
'id' => 'id',
'email' => 'email',
'name' => 'name',
'created' => 'created',
'modified' => 'modified',
'role' => 'role',
'is_active' => 'isActive',
];

public function getResourceName()
{
return 'users';
Expand Down
9 changes: 9 additions & 0 deletions application/src/Api/Adapter/VocabularyAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ class VocabularyAdapter extends AbstractEntityAdapter
'comment' => 'comment',
];

protected $scalarFields = [
'id' => 'id',
'namespace_uri' => 'namespaceUri',
'prefix' => 'prefix',
'label' => 'label',
'comment' => 'comment',
'owner' => 'owner',
];

/**
* @var array Reserved vocabulary prefixes
*/
Expand Down

0 comments on commit 8d26c94

Please sign in to comment.