src/pages/MediaPage.php
public function Link($action = null) {

		$parent = $this->getParent();
		if(!$parent) {
			return null;
		}
		$date = ($parent->URLFormatting !== '-') ? $this->dbObject('Date')->Format($parent->URLFormatting ?: 'y/MM/dd/') : '';
		$join = array(
			$parent->Link(),
			"{$date}{$this->URLSegment}/"
		);
		if($action) {
			$join[] = "{$action}/";
		}
		$link = Controller::join_links($join);
		return $link;
	}
public function Link($action = null) {

		$parent = $this->getParent();
		if(!$parent) {
			return null;
		}
		$date = ($parent->URLFormatting !== '-') ? $this->dbObject('Date')->Format($parent->URLFormatting ?: 'y/MM/dd/') : '';
		$join = array(
			$parent->Link(),
			"{$date}{$this->URLSegment}/"
		);
		if($action) {
			$join[] = "{$action}/";
		}
		$link = Controller::join_links($join);
		return $link;
	}
public function Link ( $ action = null ) { $ parent = $ this -> getParent ( ) ; if ( ! $ parent ) { return null ; } $ date = ( $ parent -> URLFormatting !== '-' ) ? $ this -> dbObject ( 'Date' ) -> Format ( $ parent -> URLFormatting ? : 'y/MM/dd/' ) : '' ; $ join = array ( $ parent -> Link ( ) , "{$date}{$this->URLSegment}/" ) ; if ( $ action ) { $ join [ ] = "{$action}/" ; } $ link = Controller :: join_links ( $ join ) ; return $ link ; }
Determine the URL by using the media holder's defined URL format.
Determine the URL by using the media holder s defined URL format .