flatpage/flatpage.php

Show: inherited
Table of Contents

The flatpage model

Author
abidibo  
Copyright
2011 Otto srl  
License
MIT license  
Package
jeff-flatpage  
Version
1.21  

\flatpage

Package: jeff-flatpage

The flatpage model class

Inherits from jeff model class.
This class defines the flatpage fields and provides a method to retrieve an object from a slug (url request)

Model fields:
- int id: page identifier
- string date: page date
- string title: page title
- string slug: url query string
- string subtitle: page subtitle
- string abstract: page abstract
- string text: page text
- string image1: first image filename
- string image2: second image filename
- string video1: first video url code (youtube)
- string video2: second video url code (youtube)
- string groups: comma separated list of system group ids who may access the content. If empty the content is visible to everyone.

Parent(s)
\model
Author
abidibo  
Copyright
2011 Otto srl  
License
MIT license  
Uses
\model  
Version
1.21  

Methods

methodpublic__construct( \registry $registry, int $id ) : void

flatpage model constructor

Parameters
Name Type Description
$registry \registry
$id int
Details
Access
public  
methodpublicgetFromSlug( \registry $registry, string $slug ) : mixed
static

Get flatpage object from slug

Perform an sql select statement to retrieve page data from given slug.
Return a model instance if the slug is found, null otherwise

Parameters
Name Type Description
$registry \registry
$slug string

the slug taken from the query string

Returns
Type Description
mixed returns the flatpage object if found, null otherwise
Details
Access
public  
Static
 
methodprivateinitP( int $id ) : \array[string]mixed

Initialize the class properties retrieving them from database

Parameters
Name Type Description
$id int
Returns
Type Description
\array[string]mixed
Details
Access
private  
Documentation was generated by DocBlox 0.15.1.