Drupal 8  8.0.2
Feed Class Reference
Inheritance diagram for Feed:

Public Member Functions

 label ()
 
 deleteItems ()
 
 refreshItems ()
 
 getUrl ()
 
 getRefreshRate ()
 
 getLastCheckedTime ()
 
 getQueuedTime ()
 
 getWebsiteUrl ()
 
 getDescription ()
 
 getImage ()
 
 getHash ()
 
 getEtag ()
 
 getLastModified ()
 
 setTitle ($title)
 
 setUrl ($url)
 
 setRefreshRate ($refresh)
 
 setLastCheckedTime ($checked)
 
 setQueuedTime ($queued)
 
 setWebsiteUrl ($link)
 
 setDescription ($description)
 
 setImage ($image)
 
 setHash ($hash)
 
 setEtag ($etag)
 
 setLastModified ($modified)
 
- Public Member Functions inherited from ContentEntityBase
 __construct (array $values, $entity_type, $bundle=FALSE, $translations=array())
 
 postCreate (EntityStorageInterface $storage)
 
 setNewRevision ($value=TRUE)
 
 isNewRevision ()
 
 isDefaultRevision ($new_value=NULL)
 
 isRevisionTranslationAffected ()
 
 setRevisionTranslationAffected ($affected)
 
 isDefaultTranslation ()
 
 getRevisionId ()
 
 isTranslatable ()
 
 preSave (EntityStorageInterface $storage)
 
 preSaveRevision (EntityStorageInterface $storage,\stdClass $record)
 
 validate ()
 
 isValidationRequired ()
 
 setValidationRequired ($required)
 
 __sleep ()
 
 id ()
 
 bundle ()
 
 uuid ()
 
 hasField ($field_name)
 
 get ($field_name)
 
 set ($name, $value, $notify=TRUE)
 
 getFields ($include_computed=TRUE)
 
 getTranslatableFields ($include_computed=TRUE)
 
 getIterator ()
 
 getFieldDefinition ($name)
 
 getFieldDefinitions ()
 
 toArray ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 onChange ($name)
 
 getTranslation ($langcode)
 
 getUntranslated ()
 
 hasTranslation ($langcode)
 
 isNewTranslation ()
 
 removeTranslation ($langcode)
 
 getTranslationLanguages ($include_default=TRUE)
 
 updateOriginalValues ()
 
__get ($name)
 
 __set ($name, $value)
 
 __isset ($name)
 
 __unset ($name)
 
 createDuplicate ()
 
 __clone ()
 
 label ()
 
 referencedEntities ()
 
- Public Member Functions inherited from Entity
 __construct (array $values, $entity_type)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=[])
 
 toUrl ($rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($rel)
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 url ($rel= 'canonical', $options=array())
 
 uriRelationships ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 save ()
 
 delete ()
 
 createDuplicate ()
 
 getEntityType ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 referencedEntities ()
 
 getCacheContexts ()
 
 getCacheTagsToInvalidate ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 __sleep ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 
- Public Member Functions inherited from ContentEntityInterface
 hasTranslationChanges ()
 
- Public Member Functions inherited from TranslatableInterface
 addTranslation ($langcode, array $values=array())
 

Static Public Member Functions

static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static baseFieldDefinitions (EntityTypeInterface $entity_type)
 
- Static Public Member Functions inherited from ContentEntityBase
static bundleFieldDefinitions (EntityTypeInterface $entity_type, $bundle, array $base_field_definitions)
 
- Static Public Member Functions inherited from Entity
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 
- Static Public Member Functions inherited from FieldableEntityInterface
static baseFieldDefinitions (EntityTypeInterface $entity_type)
 

Additional Inherited Members

- Data Fields inherited from ContentEntityBase
const TRANSLATION_REMOVED = 0
 
const TRANSLATION_EXISTING = 1
 
const TRANSLATION_CREATED = 2
 
- Protected Member Functions inherited from ContentEntityBase
 getLanguages ()
 
 clearTranslationCache ()
 
 getTranslatedField ($name, $langcode)
 
 setDefaultLangcode ()
 
 updateFieldLangcodes ($langcode)
 
 initializeTranslation ($langcode)
 
 getEntityKey ($key)
 
- Protected Member Functions inherited from Entity
 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 
- Static Protected Member Functions inherited from Entity
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 
- Protected Attributes inherited from ContentEntityBase
 $values = array()
 
 $fields = array()
 
 $fieldDefinitions
 
 $languages
 
 $langcodeKey
 
 $defaultLangcodeKey
 
 $activeLangcode = LanguageInterface::LANGCODE_DEFAULT
 
 $defaultLangcode
 
 $translations = array()
 
 $translationInitialize = FALSE
 
 $newRevision = FALSE
 
 $isDefaultRevision = TRUE
 
 $entityKeys = array()
 
 $translatableEntityKeys = array()
 
 $validated = FALSE
 
 $validationRequired = FALSE
 
- Protected Attributes inherited from Entity
 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Detailed Description

Defines the aggregator feed entity class.

( id = "aggregator_feed", label = ("Aggregator feed"), handlers = { "storage" = "Drupal\aggregator\FeedStorage", "storage_schema" = "Drupal\aggregator\FeedStorageSchema", "view_builder" = "Drupal\aggregator\FeedViewBuilder", "access" = "Drupal\aggregator\FeedAccessControlHandler", "views_data" = "Drupal\aggregator\AggregatorFeedViewsData", "form" = { "default" = "Drupal\aggregator\FeedForm", "delete" = "Drupal\aggregator\Form\FeedDeleteForm", "delete_items" = "Drupal\aggregator\Form\FeedItemsDeleteForm", }, "route_provider" = { "html" = "Drupal\aggregator\FeedHtmlRouteProvider", }, }, links = { "canonical" = "/aggregator/sources/{aggregator_feed}", "edit-form" = "/aggregator/sources/{aggregator_feed}/configure", "delete-form" = "/aggregator/sources/{aggregator_feed}/delete", }, field_ui_base_route = "aggregator.admin_overview", base_table = "aggregator_feed", render_cache = FALSE, entity_keys = { "id" = "fid", "label" = "title", "langcode" = "langcode", "uuid" = "uuid", } )

Member Function Documentation

static baseFieldDefinitions ( EntityTypeInterface  $entity_type)
static

{}

References BaseFieldDefinition\create(), Drupal\service(), and t().

Here is the call graph for this function:

deleteItems ( )

{Deletes all items from a feed.This will also reset the last checked and modified time of the feed and save it.

Returns
The class instance that this method is called on.
See Also
::delete()
}

Implements FeedInterface.

References Entity\save(), Drupal\service(), Feed\setEtag(), Feed\setHash(), Feed\setLastCheckedTime(), and Feed\setLastModified().

Here is the call graph for this function:

getDescription ( )

{Returns the description of the feed.

Returns
string The description of the feed.
}

Implements FeedInterface.

getEtag ( )

{Returns the entity tag HTTP response header, used for validating cache.

Returns
string The entity tag HTTP response header.
}

Implements FeedInterface.

getHash ( )

{Returns the calculated hash of the feed data, used for validating cache.

Returns
string The calculated hash of the feed data.
}

Implements FeedInterface.

getImage ( )

{Returns the primary image attached to the feed.

Returns
string The URL of the primary image attached to the feed.
}

Implements FeedInterface.

getLastCheckedTime ( )

{Returns the last time where the feed was checked for new items.

Returns
int The timestamp when new items were last checked for.
}

Implements FeedInterface.

getLastModified ( )

{Return when the feed was modified last time.

Returns
int The timestamp of the last time the feed was modified.
}

Implements FeedInterface.

getQueuedTime ( )

{Returns the time when this feed was queued for refresh, 0 if not queued.

Returns
int The timestamp of the last refresh.
}

Implements FeedInterface.

getRefreshRate ( )

{Returns the refresh rate of the feed in seconds.

Returns
int The refresh rate of the feed in seconds.
}

Implements FeedInterface.

getUrl ( )

{Returns the url to the feed.

Returns
string The url to the feed.
}

Implements FeedInterface.

getWebsiteUrl ( )

{Returns the parent website of the feed.

Returns
string The parent website of the feed.
}

Implements FeedInterface.

label ( )

{Gets the label of the entity.

Returns
string|null The label of the entity, or NULL if there is no label defined.
}

Implements EntityInterface.

static postDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{}

References Drupal\entityManager(), Drupal\entityQuery(), and Drupal\moduleHandler().

Here is the call graph for this function:

static preCreate ( EntityStorageInterface  $storage,
array &  $values 
)
static

{}

static preDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{}

References Drupal\service().

Here is the call graph for this function:

refreshItems ( )

{Updates the feed items by triggering the import process.This will also update the last checked time of the feed and save it.

Returns
bool TRUE if there is new content for the feed FALSE otherwise.
See Also
::refresh()
}

Implements FeedInterface.

References Entity\save(), Drupal\service(), Feed\setLastCheckedTime(), and Feed\setQueuedTime().

Here is the call graph for this function:

setDescription (   $description)

{Sets the description of the feed.

Parameters
string$descriptionThe description of the feed.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Here is the call graph for this function:

setEtag (   $etag)

{Sets the entity tag HTTP response header, used for validating cache.

Parameters
string$etagA string containing the entity tag HTTP response header.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Referenced by Feed\deleteItems().

Here is the call graph for this function:

Here is the caller graph for this function:

setHash (   $hash)

{Sets the calculated hash of the feed data, used for validating cache.

Parameters
string$hashA string containing the calculated hash of the feed. Must contain US ASCII characters only.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Referenced by Feed\deleteItems().

Here is the call graph for this function:

Here is the caller graph for this function:

setImage (   $image)

{Sets the primary image attached to the feed.

Parameters
string$imageAn image URL.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Here is the call graph for this function:

setLastCheckedTime (   $checked)

{Sets the time when this feed was queued for refresh, 0 if not queued.

Parameters
int$checkedThe timestamp of the last refresh.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Referenced by Feed\deleteItems(), and Feed\refreshItems().

Here is the call graph for this function:

Here is the caller graph for this function:

setLastModified (   $modified)

{Sets the last modification of the feed.

Parameters
int$modifiedThe timestamp when the feed was modified.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Referenced by Feed\deleteItems().

Here is the call graph for this function:

Here is the caller graph for this function:

setQueuedTime (   $queued)

{Sets the time when this feed was queued for refresh, 0 if not queued.

Parameters
int$queuedThe timestamp of the last refresh.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Referenced by Feed\refreshItems().

Here is the call graph for this function:

Here is the caller graph for this function:

setRefreshRate (   $refresh)

{Sets the refresh rate of the feed in seconds.

Parameters
int$refreshThe refresh rate of the feed in seconds.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Here is the call graph for this function:

setTitle (   $title)

{Sets the title of the feed.

Parameters
string$titleThe short title of the feed.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Here is the call graph for this function:

setUrl (   $url)

{Sets the url to the feed.

Parameters
string$urlA string containing the url of the feed.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Here is the call graph for this function:

setWebsiteUrl (   $link)

{Sets the parent website of the feed.

Parameters
string$linkA string containing the parent website of the feed.
Returns
The class instance that this method is called on.
}

Implements FeedInterface.

References ContentEntityBase\set().

Here is the call graph for this function:


The documentation for this class was generated from the following file: