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

Public Member Functions

 getDefaultPage ($section)
 Returns the identifier for the default page in the section (i.e. More...
 
 getContent ($section, $identifier)
 Returns a SectionContent object for the specified section and identifier. More...
 
 sendContent ($section, $identifier)
 Renders and sends the specified content for the given section. More...
 
 getAdminView ($section)
 Factory method to build the view class for displaying and manipulating section content for the specified section. More...
 

Detailed Description

Definition at line 73 of file section_content_manager.inc.

Member Function Documentation

◆ getAdminView()

SectionContentManager::getAdminView (   $section)

Factory method to build the view class for displaying and manipulating section content for the specified section.

Parameters
unknown$section

Implements ISectionContentManager.

Definition at line 104 of file section_content_manager.inc.

◆ getContent()

SectionContentManager::getContent (   $section,
  $identifier 
)

Returns a SectionContent object for the specified section and identifier.

Parameters
Section$section
string$identifier

Implements ISectionContentManager.

Definition at line 77 of file section_content_manager.inc.

78  {
79  try
80  {
81  return Query::create(SectionContent, "WHERE section_id=:section_id AND identifier=:identifier")
82  ->bind(":section_id", $section->section_id, ":identifier", $identifier)
83  ->executeSingle();
84  }
85  catch(DataNotFoundException $e)
86  {
87  return null;
88  }
89  }
$identifier
Definition: rss.inc:37

◆ getDefaultPage()

SectionContentManager::getDefaultPage (   $section)

Returns the identifier for the default page in the section (i.e.

the page that should be served when no identifier is specified).

Implements ISectionContentManager.

Definition at line 75 of file section_content_manager.inc.

75 { return $section->default_page; }

◆ sendContent()

SectionContentManager::sendContent (   $section,
  $identifier 
)

Renders and sends the specified content for the given section.

Parameters
Section$section
string$identifier

Implements ISectionContentManager.

Definition at line 91 of file section_content_manager.inc.

92  {
93  try
94  {
95  ComponentManager::fireEvent("ResolveIdentifier", $identifier, true);
96  }
97  catch(FakoliEventNotConsumed $e)
98  {
99  throw new FakoliException("The resource '$identifier' is disabled");
100  }
101 
102  }
static fireEvent($event, $parameter=null, $mustBeConsumed=false)
Fire an event to all subscribers as detailed in their manifests.
FakoliEventNotConsumed is thrown when no subscriber has handled an event that was fired with $mustBeC...
Definition: core.inc:69
FakoliException is the base exception class for all Fakoli errors.
Definition: core.inc:53

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