Commit 3c1589bc authored by recidive's avatar recidive Committed by Nicholas Thompson
Browse files

#1481104 - Adding support for UUID and Deploy module. Not building as separate...

#1481104 - Adding support for UUID and Deploy module. Not building as separate module, but as a function which implements the hook.
parent f56023cc
...@@ -760,6 +760,30 @@ function page_title_views_plugins() { ...@@ -760,6 +760,30 @@ function page_title_views_plugins() {
} }
/**
* Implements hook_entity_uuid_save()
*/
function page_title_uuid_entity_uuid_save(&$entity, $entity_type) {
if (!empty($entity->page_title)) {
// Insert page_title record for this entity.
db_insert('page_title')
->fields(array(
'type' => $entity_type,
'id' => entity_id($entity_type, $entity),
'page_title' => $entity->page_title,
))
->execute();
}
else {
// Delete item so we get an auto-generated value basedo on settings.
db_delete('page_title')
->condition('type', $entity_type)
->condition('id', entity_id($entity_type, $entity))
->execute();
}
}
/** /**
* Get the Page Title Setttings * Get the Page Title Setttings
*/ */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment