You are here

class SchemaPropertyType in Schema.org Metatag 8.2

Defines a Schema property type item annotation object.

Hierarchy

Expanded class hierarchy of SchemaPropertyType

See also

\Drupal\schema_metatag\Plugin\schema_metatag\PropertyTypeManager

Plugin API

43 classes are annotated with SchemaPropertyType
Action in src/Plugin/schema_metatag/PropertyType/Action.php
Provides a plugin for the 'Action' Schema.org property type.
AggregateRating in src/Plugin/schema_metatag/PropertyType/AggregateRating.php
Provides a plugin for the 'AggregateRating' Schema.org property type.
Answer in src/Plugin/schema_metatag/PropertyType/Answer.php
Provides a plugin for the 'Answer' Schema.org property type.
Book in src/Plugin/schema_metatag/PropertyType/Book.php
Provides a plugin for the 'Book' Schema.org property type.
Boolean in src/Plugin/schema_metatag/PropertyType/Boolean.php
Provides a plugin for the 'Boolean' Schema.org property type.

... See full list

File

src/Annotation/SchemaPropertyType.php, line 15

Namespace

Drupal\schema_metatag\Annotation
View source
class SchemaPropertyType extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The label of the plugin.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * Property type.
   *
   * The type of Schema.org property being defined.
   *
   * @var string
   */
  public $property_type;

  /**
   * Sub-properties.
   *
   * A key/value array of sub-properties used in this property.
   *
   * Many property types consist of a collection of sub-properties, for instance
   * the Organization type includes name, url, and description. It also has
   * complex subproperties that themselves contain sub-properties, like image.
   *
   * @var array
   */
  public $sub_properties;

  /**
   * Tree parent.
   *
   * An array of the top level Schema.org class(es) used by this property type,
   * those that should be displayed as options for the @type property of the
   * property. All matching objects are pulled from Schema.org data. This is
   * only used by property types that create a sub-array using '@type', leave
   * empty for simple property types like Text or Number.
   *
   * @var array
   */
  public $tree_parent;

  /**
   * Tree depth.
   *
   * Goes with the $tree_parent, the depth used for the above parent(s) to
   * create the desired array of @type values. This will limit the depth
   * of elements pulled from the data. To pull all values, set this to -1.
   *
   * @var int
   */
  public $tree_depth;

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
SchemaPropertyType::$id public property The plugin ID.
SchemaPropertyType::$label public property The label of the plugin.
SchemaPropertyType::$property_type public property Property type.
SchemaPropertyType::$sub_properties public property Sub-properties.
SchemaPropertyType::$tree_depth public property Tree depth.
SchemaPropertyType::$tree_parent public property Tree parent.