Example #1
0
 /**
  * The function returns parent Page.
  *
  * @access public
  * @return object The parent Page.
  */
 public function getParent()
 {
     $Page = new self();
     return $Page->findItem(array('Id = ' . $this->ParentId));
 }
Example #2
0
 public static function getCurrency($id = false)
 {
     $Currency = new self();
     $params = array();
     if ($id) {
         return $Currency->findItem(array('Id = ' . $id));
     }
     if ($Id = Request::get('Currency', false, 'COOKIE')) {
         $params[] = 'Id = ' . $Id;
     } else {
         $params[] = 'Position = 1';
     }
     return $Currency->findItem($params);
 }