public function getSearchSummary() { return aString::limitWords($this->getSearchText(false), sfConfig::get('app_a_search_summary_wordcount', 50), "..."); }
/** * * @param string $areas Array of areas to retrieve text for * @param int $limit Number of characters to restrict retrieval to * @return string */ public function getTextForAreas($areas = array(), $limit = null, $options = null) { if (is_null($options)) { $options = array('append_ellipsis' => true); } $text = ''; foreach ($areas as $area) { foreach ($this->Page->getArea($area) as $slot) { if (method_exists($slot, 'getText')) { $text .= $slot->getText(); } } } if (!is_null($limit)) { $text = aString::limitWords($text, $limit, $options); } return $text; }