Permalink
Browse files

adaptation to use with custom select

  • Loading branch information...
1 parent 4e76266 commit ec190d129164145b0711db05e3ede393d46ba00d @Floby Floby committed Sep 19, 2012
@@ -97,9 +97,11 @@ protected function _populateArrayFromRow(Centurion_Db_Table_Row_Abstract $row)
* @param (string) $terms a string contains terms or keywords to look for
* @return [Centurion_Db_Table_Row_Abstract]
*/
- public function crawlTable(Centurion_Db_Table_Abstract $table, array $fields, $terms, $limit=0)
+ public function crawlTable(Centurion_Db_Table_Abstract $table, array $fields, $terms, $limit=0, $select = null)
{
- $select = $table->select(true);
+ if(null === $select) {
+ $select = $table->select(true);
+ }
$this->selectKeywordsInTextFields($select, $fields, $terms);
if(0 < $limit) {
$select->limit($limit);
@@ -27,7 +27,7 @@ public function __construct(array $params)
$this->_models = $params['models'];
- parent::__construct();
+ parent::__construct($params);
}
public function crawl(array $params=null)
@@ -5,7 +5,7 @@
class Highlight_Model_DbTable_Row_Container extends Centurion_Db_Table_Row_Proxy
{
protected $_highlightModel = null;
-
+
public function init()
{
$this->_specialGets['row_set'] = 'getRowSet';
@@ -48,6 +48,9 @@ public function getTitle($row)
*/
public function titleGetter()
{
+ if(!empty($this->description)) {
+ return $this->description;
+ }
if(null === $this->name) {
return $this->getTitle($this->getProxy());
}
@@ -6,7 +6,10 @@ else {
$this->placeholder('headling_1')->set('<h1>Manage named highlights</h1>');
}
?>
-<?php
-foreach ($this->containers as $container) {
- echo '<a href="' . $this->url(array('action' => 'get', 'id' => $container->id)) . '">' . $container->name . '</a><br />';
-}
+<ul>
+<?php foreach ($this->containers as $container) : ?>
+ <li>
+ <a href="<?php echo $this->url(array('action' => 'get', 'id' => $container->id))?>"> <?php echo $container->title ?></a><br />
+ </li>
+<?php endforeach ?>
+</ul>

0 comments on commit ec190d1

Please sign in to comment.