Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Defines the SongHolder page type
- */
- class SongHolder extends Page {
- static $db = array(
- );
- static $has_one = array(
- );
- static $allowed_children = array('SongDetailPage');
- }
- class SongHolder_Controller extends Page_Controller
- {
- function song()
- {
- static $song = null;
- if(!$song)
- {
- if($id = (int) Director::urlParam('ID'))
- {
- $song = DataObject::get_by_id("Song", $id);
- }
- }
- return $song;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement