All Classes Functions Variables Pages
Extensions\Carousel Class Reference

Public Member Functions

 Carousel ($options, $Automad)

Detailed Description

The Carousel extension creates the markup for a Twitter Bootstrap carousel and automatically generates page variables for each matched image. To be used, Twitter's Bootstrap CSS and JS files are required.

Marc Anton Dahmen hello.nosp@m.@mar.nosp@m.cdahm.nosp@m.en.d.nosp@m.e
MIT license -

Definition at line 26 of file carousel.php.

Member Function Documentation

Extensions\Carousel::Carousel (   $options,

Every extension has one main method which will be called when parsing a template file. The name of that method is the same name as the name of the class and subnamespace (case insensitive). The .php file of the class gets simply the same name as the containing folder: /extensions/carousel/carousel.php

In this case the naming pattern looks like:

  • namespace: Extensions
  • directory: /extensions/carousel
  • class file: /extensions/carousel/carousel.php
  • class: Carousel
  • method: Carousel

This main method must always have two parameters, which will be passed automatically when calling the extension: $obj->Carousel($options, $Automad)

  • $options: An array with all the options
  • $Automad: The Automad object.

Note: The Carousel method is not a kind of constructor (like it would be in PHP 4). Since this is a namespaced class, a method with the same name as the last part of the namespace isn't called when creating an instance of the class (PHP 5.3+).

The generated HTML of the Carousel.

Definition at line 54 of file carousel.php.

References Automad\Core\Parse\fileDeclaration().

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