Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
LastRemembered Class Reference
Inheritance diagram for LastRemembered:
BaseWidget

Public Member Functions

 run ()
- Public Member Functions inherited from BaseWidget
 getViewFile ($viewName)

Public Attributes

 $collection_id
 $count = 4

Detailed Description

Gentics Portal.Node PHP Author & Copyright (c) by Gentics Software GmbH sales.nosp@m.@gen.nosp@m.tics..nosp@m.com http://www.gentics.com Licenses can be found in the LICENSE.txt file in the root-folder of this installation You must not use this software without a valid license agreement.

Last remembered widget - displays last N remembered pages

Definition at line 14 of file LastRemembered.php.

Member Function Documentation

LastRemembered::run ( )

Find pages, display

Definition at line 34 of file LastRemembered.php.

References RememberedPage\model().

{
if($this->collection_id === null){
$this->collection_id = Yii::app()->getModule('remember')->getUserCollectionId();
}
$criteria = new CDbCriteria();
$criteria->compare('collection_id', $this->collection_id);
$criteria->order = 'created DESC';
$criteria->limit = $this->count;
$pages = RememberedPage::model()->findAll($criteria);
if(count($pages)){
$this->render('LastRemembered', array('pages'=>$pages));
}
}

The documentation for this class was generated from the following file: