You are here

SchemaGroupBase.php in Schema.org Metatag 8.2

Same filename and directory in other branches
  1. 8 src/Plugin/metatag/Group/SchemaGroupBase.php

File

src/Plugin/metatag/Group/SchemaGroupBase.php
View source
<?php

namespace Drupal\schema_metatag\Plugin\metatag\Group;

use Drupal\metatag\Plugin\metatag\Group\GroupBase;

/**
 * Schema.org groups should extend this class.
 */
abstract class SchemaGroupBase extends GroupBase {

  /**
   * Whether this is structured data.
   *
   * @var bool
   */
  protected $schemaMetatag;

  /**
   * {@inheritdoc}
   */
  public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->schemaMetatag = $plugin_definition['schema_metatag'];
  }

  /**
   * Returns whether this is structured data.
   */
  public function schemaMetatag() {
    return $this->schemaMetatag;
  }

}

Classes

Namesort descending Description
SchemaGroupBase Schema.org groups should extend this class.