flatpage/flatpage.controller.php
The flatpage controller
- Author
- abidibo
- Copyright
- 2011 Otto srl
- License
- MIT license
- Package
- jeff-flatpage
- Version
- 1.21
\flatpageController
The flatpage controller class
Inherits from jeff controller class.
This class is the flatpage module interface, defines all public methods that may be accessed through url.
- Parent(s)
- \controller
- Author
- abidibo
- Copyright
- 2011 Otto srl
- License
- MIT license
- Uses
- \controller
- Version
- 1.21
Methods
__construct(
\registry $registry
)
:
void
flatpage controller constructor
Name | Type | Description |
---|---|---|
$registry | \registry |
- Access
- public
manage(
)
:
string
Method called to display the flatpage backoffice interface
Manages the pages list, allows insertion of new pages, modification and deletion of existing pages.
Type | Description |
---|---|
string |
- Access
- public
parseDescription(
\array[int]string $matches
)
:
string
Page text parser
Parse page text and replace custom images and video tags with html images and youtube iframes.
Name | Type | Description |
---|---|---|
$matches | \array[int]string |
Type | Description |
---|---|
string |
- Access
- private
view(
)
:
string
Method called to display a page content
Read the requested slug from $_GET variables, try to get the associated page contents from database.
Display page contents if found and not forbidden.
Display a 403 template if contents are forbidden to requesting user.
Display a 404 template if contents are not found.
Type | Description |
---|---|
string |
- Access
- public