Nos\
Orm_Behaviour_Urlenhancer
¶Nos\Orm\Model
displayed in the front-office by an URL Enhancer.Nos\Orm_Behaviour_Urlenhancer::
urls
($params = array())¶Parameters: | |
---|---|
Returns: | Associative array of all possibles URLs for this item
|
Nos\Orm_Behaviour_Urlenhancer::
url
($params = array())¶Parameters: |
|
||||
---|---|---|---|---|---|
Returns: | Absolute URL of item or |
Nos\Orm_Behaviour_Urlenhancer::
url_canonical
($params = array())¶Parameters: |
|
---|---|
Returns: | Absolute canonical URL of item or |
Alias for ->url(array('canonical' => true))
.
If the item is sharable
, returns the URL set in the shared data (content nugget)
.
Nos\Orm_Behaviour_Urlenhancer::
preview_url
()¶Returns: | Absolute canonical URL of item, even if it’s not published, or null if item can’t be displayed in the front-office. |
---|
Alias for ->url_canonical(array('preview' => true))
.
Nos\Orm_Behaviour_Urlenhancer::
deleteCacheItem
()¶Delete the cache of the pages containing this item only (this will not delete the cache for the whole enhancer).
Nos\Orm_Behaviour_Urlenhancer::
deleteCacheEnhancer
()¶Delete the cache of the pages containing an URL enhancer for the item. Warning: this will delete for all the enhancer, not only the pages containing the item.
Nos\Orm_Behaviour_Urlenhancer::
htmlAnchor
($attributes = array())¶Parameters: |
|
---|---|
Returns: | Returns an HTML anchor tag with, by default, item URL in href and item title in text. |
<?php
class Model_Monkey extends \Nos\Orm\Model
{
protected static $_behaviours = array(
'Nos\Orm_Behaviour_Urlenhancer' => array(
'enhancers' => array('noviusos_monkey'),
),
);
}