You are here

public function CacheFlushEntity::save in CacheFlush 7.3

Permanently saves the entity.

Overrides Entity::save

See also

entity_save()

File

modules/cacheflush_entity/includes/cacheflush_entity.class.inc, line 27
Provides a controller for CacheFlushEntity CRUD functionality.

Class

CacheFlushEntity
Main class for cacheflush entities.

Code

public function save() {

  // In case created timestamp is missing we create it.
  if (!isset($this->created) || empty($this->created)) {
    $this->created = REQUEST_TIME;
  }

  // We always save timestamp of last action.
  $this->changed = REQUEST_TIME;
  return entity_get_controller($this->entityType)
    ->save($this);
}