Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / metatag / src / Entity / MetatagDefaults.php
index 25ef147248e8d90bbc6f4a4047721a9a20ee90bc..17c3ad4965057441112107a5f9be62ab6be9d314 100644 (file)
@@ -30,11 +30,10 @@ use Drupal\metatag\MetatagDefaultsInterface;
  *     "label" = "label"
  *   },
  *   links = {
- *     "canonical" = "/admin/structure/metatag_defaults/{metatag_defaults}",
- *     "edit-form" = "/admin/structure/metatag_defaults/{metatag_defaults}/edit",
- *     "delete-form" = "/admin/structure/metatag_defaults/{metatag_defaults}/delete",
- *     "revert-form" = "/admin/structure/metatag_defaults/{metatag_defaults}/revert",
- *     "collection" = "/admin/structure/metatag_defaults"
+ *     "edit-form" = "/admin/config/search/metatag/{metatag_defaults}/edit",
+ *     "delete-form" = "/admin/config/search/metatag/{metatag_defaults}/delete",
+ *     "revert-form" = "/admin/config/search/metatag/{metatag_defaults}/revert",
+ *     "collection" = "/admin/config/search/metatag"
  *   }
  * )
  */
@@ -66,7 +65,8 @@ class MetatagDefaults extends ConfigEntityBase implements MetatagDefaultsInterfa
    *
    * @param string $tag_id
    *   The identifier of the tag.
-   * @return boolean
+   *
+   * @return bool
    *   TRUE if the tag exists.
    */
   public function hasTag($tag_id) {
@@ -78,8 +78,9 @@ class MetatagDefaults extends ConfigEntityBase implements MetatagDefaultsInterfa
    *
    * @param string $tag_id
    *   The identifier of the tag.
-   * @return array|NULL
-   *   array containing the tag values or NULL if not found.
+   *
+   * @return array|null
+   *   Array containing the tag values or NULL if not found.
    */
   public function getTag($tag_id) {
     if (!$this->hasTag($tag_id)) {
@@ -92,7 +93,6 @@ class MetatagDefaults extends ConfigEntityBase implements MetatagDefaultsInterfa
    * Reverts an entity to its default values.
    */
   public function revert() {
-    $config_installer = \Drupal::service('config.installer');
     $default_install_path = drupal_get_path('module', 'metatag') . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
     $storage = new FileStorage($default_install_path, StorageInterface::DEFAULT_COLLECTION);
     $default_config_data = $storage->read('metatag.metatag_defaults.' . $this->id());