CMS  Version 3.9
PageSearchResult Class Reference
+ Inheritance diagram for PageSearchResult:
+ Collaboration diagram for PageSearchResult:

Public Member Functions

 PageSearchResult ($item)
 
 getPrimaryKey ()
 
 get ($field)
 
 prettifyClassName ($plural=false)
 
 format ($format)
 
 relevance ()
 
 title ()
 
 date ()
 
 summary ()
 Display the item title and any other essential details for the item such as author and a create date. More...
 
- Public Member Functions inherited from AbstractSearchResult
 formatIcon ($icon, $alt)
 

Public Attributes

 $item
 

Detailed Description

Definition at line 284 of file page.inc.

Member Function Documentation

◆ date()

PageSearchResult::date ( )

Reimplemented from AbstractSearchResult.

Definition at line 308 of file page.inc.

309  {
310  return $this->item->created_date;
311  }

◆ format()

PageSearchResult::format (   $format)

Reimplemented from AbstractSearchResult.

Definition at line 296 of file page.inc.

296 { return $this->item->format($format); }

◆ get()

PageSearchResult::get (   $field)

Reimplemented from AbstractSearchResult.

Definition at line 294 of file page.inc.

294 { return $this->item->get($field); }

◆ getPrimaryKey()

PageSearchResult::getPrimaryKey ( )

Reimplemented from AbstractSearchResult.

Definition at line 293 of file page.inc.

293 { return $this->item->getPrimaryKey(); }

◆ PageSearchResult()

PageSearchResult::PageSearchResult (   $item)

Definition at line 288 of file page.inc.

289  {
290  $this->item = $item;
291  }

◆ prettifyClassName()

PageSearchResult::prettifyClassName (   $plural = false)

Reimplemented from AbstractSearchResult.

Definition at line 295 of file page.inc.

295 { return $this->item->prettifyClassName($plural = false); }

◆ relevance()

PageSearchResult::relevance ( )

Reimplemented from AbstractSearchResult.

Definition at line 298 of file page.inc.

299  {
300  return 0.2;
301  }

◆ summary()

PageSearchResult::summary ( )

Display the item title and any other essential details for the item such as author and a create date.

If Application Settings is set to show text fragment, display the teaser and a Read More link; otherwise, put the link to the full item' details directly on the title.

Reimplemented from AbstractSearchResult.

Definition at line 313 of file page.inc.

314  {
315  $img = $this->formatIcon('/fakoli/richtext/images/hyperlink.gif', 'cms_page');
316 
317  if(Settings::getValue("search", "show_text_fragment"))
318  {
319  return $this->item->format("{$img}<h4>{page_title}</h4><p>{description:300}</p><a href='{identifier}'>Read More</a>");
320 
321  }
322  else
323  {
324  return $this->item->format("{$img}<h4><a href='{identifier}'>{page_title}</a></h4>");
325  }
326  }
formatIcon($icon, $alt)
Definition: searchable.inc:78
static getValue($component, $name)
Retrieve the value of the specified Setting.
Definition: settings.inc:104

◆ title()

PageSearchResult::title ( )

Reimplemented from AbstractSearchResult.

Definition at line 303 of file page.inc.

304  {
305  return $this->item->page_title;
306  }

Member Data Documentation

◆ $item

PageSearchResult::$item

Definition at line 286 of file page.inc.


The documentation for this class was generated from the following file: