Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Implemented some template consistency when defining function parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed Feb 17, 2015
1 parent 712a4f8 commit 78a8026
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/pages/MediaPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,20 @@ public function getAttribute($title) {
}
}

/**
* Retrieve a specific attribute for use in templates.
*
* @parameter <{ATTRIBUTE}> string
* @return media attribute
*/

public function Attribute($title) {

// This provides consistency when it comes to defining parameters from the template.

return $this->getAttribute($title);
}

}

class MediaPage_Controller extends Page_Controller {
Expand Down

0 comments on commit 78a8026

Please sign in to comment.