element in the feed. * * @var \Drupal\Core\Entity\Field\FieldInterface */ public $link ; /** * The parent website's description; * comes from the element in the feed. * * @var \Drupal\Core\Entity\Field\FieldInterface */ public $description; /** * An image representing the feed. * * @var \Drupal\Core\Entity\Field\FieldInterface */ public $image; /** * Calculated hash of the feed data, used for validating cache. * * @var \Drupal\Core\Entity\Field\FieldInterface */ public $hash; /** * Entity tag HTTP response header, used for validating cache. * * @var \Drupal\Core\Entity\Field\FieldInterface */ public $etag; /** * When the feed was last modified, as a Unix timestamp. * * @var \Drupal\Core\Entity\Field\FieldInterface */ public $modified; /** * Number of items to display in the feed’s block. * * @var \Drupal\Core\Entity\Field\FieldInterface */ public $block; /** * Overrides Drupal\Core\Entity\EntityNG::init(). */ public function init() { parent::init(); // We unset all defined properties, so magic getters apply. unset($this->fid); unset($this->title); unset($this->url); unset($this->refresh); unset($this->checked); unset($this->queued); unset($this->link); unset($this->description); unset($this->image); unset($this->hash); unset($this->etag); unset($this->modified); unset($this->block); } /** * Implements Drupal\Core\Entity\EntityInterface::id(). */ public function id() { return $this->get('fid')->value; } /** * Implements Drupal\Core\Entity\EntityInterface::label(). */ public function label($langcode = NULL) { return $this->get('title')->value; } }