Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -23,6 +23,8 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class _PageItem extends \IPS\Content\Item implements \IPS\Content\Searchable
|
||||
{
|
||||
use \IPS\Content\ViewUpdates;
|
||||
|
||||
/**
|
||||
* @brief Application
|
||||
*/
|
||||
@@ -52,7 +54,7 @@ class _PageItem extends \IPS\Content\Item implements \IPS\Content\Searchable
|
||||
* @brief Database Column Map
|
||||
*/
|
||||
public static $databaseColumnMap = array(
|
||||
|
||||
'views' => 'views'
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -234,4 +236,48 @@ class _PageItem extends \IPS\Content\Item implements \IPS\Content\Searchable
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Title for Analytics
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function titleForAnalytics(): string
|
||||
{
|
||||
try
|
||||
{
|
||||
return \IPS\Lang::load( \IPS\Lang::defaultLanguage() )->get( \IPS\cms\Pages\Page::$titleLangPrefix . $this->id );
|
||||
}
|
||||
catch( \OutOfRangeException | \UnderflowException )
|
||||
{
|
||||
return \IPS\cms\Pages\Page::$titleLangPrefix . $this->id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get node
|
||||
*
|
||||
* @return \IPS\cms\Pages\Page
|
||||
*/
|
||||
public function node()
|
||||
{
|
||||
$data = array();
|
||||
foreach ( $this->_data as $k => $v )
|
||||
{
|
||||
$data[ 'page_' . $k ] = $v;
|
||||
}
|
||||
|
||||
return \IPS\cms\Pages\Page::constructFromData( $data );
|
||||
}
|
||||
|
||||
/**
|
||||
* URL
|
||||
*
|
||||
* @param string|NULL $action Action
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function url( $action = null )
|
||||
{
|
||||
return $this->node()->url();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user