original_string: public function getList(array $options)
      {
          $options += array('active' => true);
  
          $sql = 'SELECT * FROM dashboard';
  
          $conditions = array();
  
          if (isset($options['user_id'])) {
              $sql .= ' WHERE user_id=?';
              $conditions[] = $options['user_id'];
          }
  
          $list = $this->db->fetch($sql, $conditions, array('unserialize' => 'data'));
          $result = $this->prepareList($list, $options);
  
          $this->hook->attach('dashboard.get.user', $result, $this);
          return $result;
      }
code: public function getList(array $options)
      {
          $options += array('active' => true);
  
          $sql = 'SELECT * FROM dashboard';
  
          $conditions = array();
  
          if (isset($options['user_id'])) {
              $sql .= ' WHERE user_id=?';
              $conditions[] = $options['user_id'];
          }
  
          $list = $this->db->fetch($sql, $conditions, array('unserialize' => 'data'));
          $result = $this->prepareList($list, $options);
  
          $this->hook->attach('dashboard.get.user', $result, $this);
          return $result;
      }
code_tokens: public function getList ( array $ options ) { $ options += array ( 'active' => true ) ; $ sql = 'SELECT * FROM dashboard' ; $ conditions = array ( ) ; if ( isset ( $ options [ 'user_id' ] ) ) { $ sql .= ' WHERE user_id=?' ; $ conditions [ ] = $ options [ 'user_id' ] ; } $ list = $ this -> db -> fetch ( $ sql , $ conditions , array ( 'unserialize' => 'data' ) ) ; $ result = $ this -> prepareList ( $ list , $ options ) ; $ this -> hook -> attach ( 'dashboard.get.user' , $ result , $ this ) ; return $ result ; }
docstring: Returns a dashboard record by a user ID
  @param array $options
  @return array
docstring_tokens: Returns a dashboard record by a user ID