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

Public Member Functions

 BlogSearchResult ($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 273 of file blog.inc.

Member Function Documentation

◆ BlogSearchResult()

BlogSearchResult::BlogSearchResult (   $item)

Definition at line 277 of file blog.inc.

278  {
279  $this->item = $item;
280  }

◆ date()

BlogSearchResult::date ( )

Reimplemented from AbstractSearchResult.

Definition at line 297 of file blog.inc.

298  {
299  return $this->item->created_date;
300  }

◆ format()

BlogSearchResult::format (   $format)

Reimplemented from AbstractSearchResult.

Definition at line 285 of file blog.inc.

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

◆ get()

BlogSearchResult::get (   $field)

Reimplemented from AbstractSearchResult.

Definition at line 283 of file blog.inc.

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

◆ getPrimaryKey()

BlogSearchResult::getPrimaryKey ( )

Reimplemented from AbstractSearchResult.

Definition at line 282 of file blog.inc.

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

◆ prettifyClassName()

BlogSearchResult::prettifyClassName (   $plural = false)

Reimplemented from AbstractSearchResult.

Definition at line 284 of file blog.inc.

284 { return $this->item->prettifyClassName($plural); }

◆ relevance()

BlogSearchResult::relevance ( )

Reimplemented from AbstractSearchResult.

Definition at line 287 of file blog.inc.

288  {
289  return 0.5;
290  }

◆ summary()

BlogSearchResult::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 302 of file blog.inc.

303  {
304  if(Settings::getValue("search", "show_text_fragment"))
305  {
306  return $this->item->format("<h4>{title}</h4><p>{description:200}</p><a href='{getURL()}'>Read More</a>");
307  }
308  else
309  {
310  return $this->item->format("<h4><a href='{getURL()}'>{title}</a></h4>");
311  }
312  }
static getValue($component, $name)
Retrieve the value of the specified Setting.
Definition: settings.inc:104

◆ title()

BlogSearchResult::title ( )

Reimplemented from AbstractSearchResult.

Definition at line 292 of file blog.inc.

293  {
294  return $this->item->title;
295  }

Member Data Documentation

◆ $item

BlogSearchResult::$item

Definition at line 275 of file blog.inc.


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