Jump to Content

Objective HTML

Photo Frame

Themes API

The Photo Frame Themes API is used to create your own thems which will customize the output of the field in the control panel and front-end (with Safecracker).

Properties

$description
The description of the theme.
$name
The name of the theme. This is also the name of the directory.
$moduleName
The name of the parent module directory. By default, it's set to use the photo_frame module.
$photoClass
The CSS class that is attached to the each photo.
$title
The title of the theme. This will appear as the name of the theme vs. the programmatic name.
$wrapperClass
The CSS class that is attached to the field wrapper.

Extends

BaseClass

Methods

css()

The css() method returns an array of CSS dependencies.

Return

(array)

javascript()

The javascript() method returns an array of Javascript dependencies.

Return

(array)


Example

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class SmallGridTheme extends PhotoFrameTheme {
	
	protected $title        = 'Small Grid';
	protected $name         = 'smallgrid';
	protected $description  = 'Your photos will in a 200px × 200px square ratio, inside a responsive grid.';
	protected $wrapperClass = 'photo-frame-small-grid';
	protected $photoClass   = 'photo-frame-small-grid-photo';
	
	public function __construct($params = array())
	{
    	parent::__construct($params);
	}
}