AbstractResourceEntityRepresentation

Abstract resource entity representation. Provides functionality for entities that extend Omeka\Entity\Resource.
extends Omeka\Api\Representation\AbstractEntityRepresentation

Known subclasses

Omeka\Api\Representation\ItemRepresentation, Omeka\Api\Representation\ItemSetRepresentation, Omeka\Api\Representation\MediaRepresentation
Abstract
Open source code
Methods Summary
abstract public
# getResourceJsonLd( )
Get the internal members of this resource entity.
abstract public
# getResourceJsonLdType( )
Get the JSON-LD type for this specific kind of resource.
public
public
# getJsonLdType( )
{@inheritDoc}
public
# getJsonLd( )
{@inheritDoc}
public
# resourceName( )
Get the resource name of the corresponding entity API adapter.
public
# resourceClass( )
Get the resource class representation of this resource.
public
# resourceTemplate( )
Get the resource template of this resource.
public
# owner( )
Get the owner representation of this resource.
public
# isPublic( )
Get whether this resource is public or not public.
public
# created( )
Get the date-time when this resource was created.
public
# modified( )
Get the date-time when this resource was last modified.
public
# values( )
Get all value representations of this resource. <code> array( {term} => array( 'property' => {PropertyRepresentation}, 'alternate_label' => {label}, 'alternate_comment' => {comment}, 'values' => array( {ValueRepresentation}, {ValueRepresentation}, ), ), ) </code>
public
# value( string $term , array $options = array ( ) )
Get value representations.
public
# subjectValues( int $page = NULL, int $perPage = NULL, int $property = NULL )
Get value representations where this resource is the RDF object.
public
# subjectValueTotalCount( int $property = NULL )
Get the total count of this resource's subject values.
public
# subjectValueProperties( )
Get distinct properties (predicates) where this resource is the RDF object.
public
# objectValues( )
Get value representations where this resource is the RDF subject.
public
# displayValues( array $options = array ( ) )
Get the display markup for all values of this resource. Options: + hideVocabulary: Whether to hide vocabulary labels. Default: false + viewName: Name of view script, or a view model. Default "common/resource-values"
public
# displaySubjectValues( int $page = NULL, int $perPage = NULL, int $property = NULL )
Get the display markup for values where this resource is the RDF object.
public
# displayTitle( string|null $default = NULL )
Get the display title for this resource.
public
# displayDescription( string|null $default = NULL )
Get the display description for this resource.
public
# displayResourceClassLabel( string|null $default = NULL )
Get the display resource class label for this resource.
public
# linkPretty( string $thumbnailType = 'square', string|null $titleDefault = NULL, string|null $action = NULL, array $attributes = NULL )
Get a "pretty" link to this resource containing a thumbnail and display title.
public
# valueRepresentation( )
Get the representation of this resource as a value for linking from another resource.
Methods inherited from Omeka\Api\Representation\AbstractEntityRepresentation
__construct(), userIsAllowed()
Methods inherited from Omeka\Api\Representation\AbstractResourceRepresentation
getJsonLd(), getJsonLdType(), __construct(), id(), jsonSerialize(), setId(), setAdapter(), getAdapter(), getReference(), apiUrl(), url(), adminUrl(), siteUrl(), link(), linkRaw(), getFileUrl(), getControllerName(), embeddedJsonLd()
Methods inherited from Omeka\Api\Representation\AbstractRepresentation
getAdapter(), getDateTime(), getTranslator(), getViewHelper(), primaryMedia(), getServiceLocator(), setServiceLocator()
Properties Summary
protected array $values
All value representations of this resource, organized by property. <code> array( {JSON-LD term} => array( 'property' => {property representation}, 'values' => { {value representation}, {value representation}, {...}, }, ), ) </code>
# NULL
Properties inherited from Omeka\Api\Representation\AbstractResourceRepresentation
$id, $resource, $adapter
Properties inherited from Omeka\Api\Representation\AbstractRepresentation
$translator, $viewHelperManager, $services