public function revisionIds({{ entity_class }}Interface $entity) {
return $this->database->query(
'SELECT vid FROM {{ '{'~entity_name~'_revision}' }} WHERE id=:id ORDER BY vid',
- array(':id' => $entity->id())
+ [':id' => $entity->id()]
)->fetchCol();
}
public function userRevisionIds(AccountInterface $account) {
return $this->database->query(
'SELECT vid FROM {{ '{'~entity_name~'_field_revision}' }} WHERE uid = :uid ORDER BY vid',
- array(':uid' => $account->id())
+ [':uid' => $account->id()]
)->fetchCol();
}
* {@inheritdoc}
*/
public function countDefaultLanguageRevisions({{ entity_class }}Interface $entity) {
- return $this->database->query('SELECT COUNT(*) FROM {{ '{'~entity_name~'_field_revision}' }} WHERE id = :id AND default_langcode = 1', array(':id' => $entity->id()))
+ return $this->database->query('SELECT COUNT(*) FROM {{ '{'~entity_name~'_field_revision}' }} WHERE id = :id AND default_langcode = 1', [':id' => $entity->id()])
->fetchField();
}
*/
public function clearRevisionsLanguage(LanguageInterface $language) {
return $this->database->update('{{ entity_name }}_revision')
- ->fields(array('langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED))
+ ->fields(['langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED])
->condition('langcode', $language->getId())
->execute();
}