diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index 6749310..671c961 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -89,25 +89,6 @@ function aggregator_theme() { } /** - * Implements hook_entity_info(). - */ -function aggregator_entity_info() { - $items['aggregator_item'] = array( - 'label' => t('Aggregator feed item'), - 'entity class' => 'Drupal\aggregator\Item', - 'controller class' => 'Drupal\aggregator\ItemStorageController', - 'render controller class' => 'Drupal\aggregator\ItemRenderController', - 'base table' => 'aggregator_item', - 'fieldable' => TRUE, - 'entity keys' => array( - 'id' => 'iid', - 'label' => 'title', - ), - ); - return $items; -} - -/** * Implements hook_menu(). */ function aggregator_menu() { diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Item.php b/core/modules/aggregator/lib/Drupal/aggregator/Item.php deleted file mode 100644 index a6ca1ce..0000000 --- a/core/modules/aggregator/lib/Drupal/aggregator/Item.php +++ /dev/null @@ -1,109 +0,0 @@ -iid); - unset($this->fid); - unset($this->title); - unset($this->author); - unset($this->description); - unset($this->guid); - unset($this->link); - unset($this->timestamp); - } - - /** - * Implements Drupal\Core\Entity\EntityInterface::id(). - */ - public function id() { - return $this->get('iid')->value; - } - - /** - * Implements Drupal\Core\Entity\EntityInterface::label(). - */ - public function label($langcode = NULL) { - return $this->title->value; - } -} - diff --git a/core/modules/aggregator/lib/Drupal/aggregator/ItemRenderController.php b/core/modules/aggregator/lib/Drupal/aggregator/ItemRenderController.php index 298c285..160bb72 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/ItemRenderController.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/ItemRenderController.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\aggregator\ItemRenderController. + * Cotains Drupal\aggregator\ItemRenderController. */ namespace Drupal\aggregator; @@ -11,7 +11,7 @@ use Drupal\Core\Entity\EntityRenderController; /** - * Render controller for aggregators. + * Render controller for aggregator feed items. */ class ItemRenderController extends EntityRenderController { diff --git a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php index e1b07eb..6c70fd6 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\aggregator\ItemStorageController. + * Contains Drupal\aggregator\ItemStorageController. */ namespace Drupal\aggregator; diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Item.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Item.php new file mode 100644 index 0000000..0ec136b --- /dev/null +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Item.php @@ -0,0 +1,125 @@ +iid); + unset($this->fid); + unset($this->title); + unset($this->author); + unset($this->description); + unset($this->guid); + unset($this->link); + unset($this->timestamp); + } + + /** + * Implements Drupal\Core\Entity\EntityInterface::id(). + */ + public function id() { + return $this->get('iid')->value; + } + + /** + * Implements Drupal\Core\Entity\EntityInterface::label(). + */ + public function label($langcode = NULL) { + return $this->get('title')->value; + } +} +