1 <?php
2
3 class MP3 extends File
4 {
5 static $allowed_file_types = array (
6 'mp3'
7 );
8
9 private static $player_count = 0;
10
11 public function Player()
12 {
13 self::$player_count++;
14 return $this->customise(array(
15 'SWFLink' => Director::absoluteURL('dataobject_manager/code/mp3/player.swf'),
16 'MP3Link' => Director::absoluteURL($this->URL),
17 'Count' => self::$player_count
18 ))->renderWith(array('mp3'));
19 }
20
21 public function forTemplate()
22 {
23 return $this->Player();
24 }
25
26
27 }
28
29
30 ?>
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-