Ejemplo n.º 1
0
 /**
  * Get text search field
  * @param string $name
  * @param string $value
  * @return Field
  */
 public function text($name, $value = null)
 {
     if ($value === null) {
         $value = $this->entity->getValue($name);
     }
     return Field::text($name, $value, $this->config()->getCharset());
 }
Ejemplo n.º 2
0
 /**
  * Delete search index
  *
  * @param integer|string $id
  * @return boolean
  */
 protected function deleteSearchIndex($id)
 {
     $index = $this->entity->getSearch();
     if ($index->count() > 0) {
         $id = get_class($this->table) . '_' . $id;
         $this->zendsearch()->delete($id);
         return true;
     }
     return false;
 }