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

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 8 of file sharing_content_manager.inc.

Member Function Documentation

◆ getAdminView()

SharingContentManager::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 34 of file sharing_content_manager.inc.

◆ getContent()

SharingContentManager::getContent (   $section,
  $identifier 
)

Returns a SectionContent object for the specified section and identifier.

Parameters
Section$section
string$identifier

Implements ISectionContentManager.

Definition at line 12 of file sharing_content_manager.inc.

13  {
14  // Create Mock SectionContent object
15  $content = new SectionContent();
16  $content->section_id = $section->section_id;
17  $content->identifier = $identifier;
18  return $content;
19  }
$identifier
Definition: rss.inc:37
if(array_key_exists("HTTP_IF_MODIFIED_SINCE", $_SERVER)) $content
Definition: styles.css.inc:24

◆ getDefaultPage()

SharingContentManager::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 10 of file sharing_content_manager.inc.

10 { return $section->default_page; }

◆ sendContent()

SharingContentManager::sendContent (   $section,
  $identifier 
)

Renders and sends the specified content for the given section.

Parameters
Section$section
string$identifier

Implements ISectionContentManager.

Definition at line 21 of file sharing_content_manager.inc.

22  {
23  if (!$identifier)
24  {
25  throw new FakoliException("Missing identifier");
26  }
27 
28  Fakoli::put("share_token", $identifier);
29  $page = ComponentPage::findByIdentifier('shared_view', "WHERE enabled=1");
30  $pageView = new ComponentPageView($page, "{$page->template}.tpl");
31  echo $pageView->drawView();
32  }
$page
Definition: help.inc:39
static findByIdentifier($identifier, $constraint="")
ComponentPageView generates the page content for a component page, substituting page fields,...
FakoliException is the base exception class for all Fakoli errors.
Definition: core.inc:53
static put($key, $obj)
Stores a value or object at the given key.
Definition: core.inc:99

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