1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00
This commit is contained in:
Ryan Cramer
2019-03-04 10:10:58 -05:00
parent cdb6dbaee1
commit b158b71c42
3 changed files with 19 additions and 4 deletions

View File

@@ -109,6 +109,19 @@ class PagesNames extends Wire {
return $name;
}
/**
* Does the given page have a modified “name” during this request?
*
* @param Page $page
* @param bool|null $set Specify boolean true or false to set whether or not it has an adjusted name, or omit just to get
* @return bool
*
*/
public function hasAdjustedName(Page $page, $set = null) {
if(is_bool($set)) $page->setQuietly('_hasAdjustedName', $set);
return $page->get('_hasAdjustedName') ? true : false;
}
/**
* Is given page name an untitled page name?
*