FuelPHP Gallery  2.0
An Image gallery for FuelPHP
Gallery_Section Class Reference

Static Public Member Functions

static by_parent ($id=null)
static by_id ($id=null)
static all ()
static create ($data=array())
static update ($data=array())
static delete ($id=null)

Static Protected Attributes

static $gallery_table = null
static $image_table = null

Member Function Documentation

static all ( ) [static]

Get all section of the gallery

Returns:
query The result set
static by_id ( id = null) [static]

Get the specific section of the gallery by the id

Parameters:
idThe specific section that matches the passed id (sub gallery id)
Returns:
query The result set
static by_parent ( id = null) [static]

Get the section of the gallery by the parent id

Parameters:
idThe sections with the parent id equal to $id (sub gallery id)
Returns:
query The result set
static create ( data = array()) [static]

Create a new section of the gallery (sub gallery)

Parameters:
arrayContaining the creation data

Example usage:

 array(
    'name' => 'My Gallery',    
    'filename' => 'test.jpg',
    'parent_id' => 5
 )
Returns:
query The result set
static delete ( id = null) [static]

Delete a section of the gallery (sub gallery)

Parameters:
idThe id of the section to delete (gallery)
Warning:
This will delete all table entries and images associated with the section
Returns:
success Return true or false
static update ( data = array()) [static]

Update a section of the gallery (sub gallery)

Parameters:
arrayContaining the update data

Example usage:

 array(
    'id' => 7,    
    'name' => 'My Gallery',    
    'filename' => 'test.jpg',
    'parent_id' => 5
 )
Warning:
If you are not updating the filename exclude it from the array
Returns:
query The result set

The documentation for this class was generated from the following file:
 All Data Structures Functions