public static function hook_init($query) { $backend_query = BackendQuery::retrieve($query); if ($backend_query) { $_REQUEST['q'] = $backend_query['query']; return $backend_query['query']; } return $query; }
public function post_create($id = false) { $result = parent::post_create(); if ($result instanceof ContentObj) { /* TODO This can easily "overwrite" existing urls */ if (is_post() && Component::isActive('BackendQuery')) { BackendQuery::add($result->array['name'], 'content/display/' . $result->array['id']); } } return $result; }