/** * Returns an input field, class="text" and type="text" with an optional maxlength */ function __construct($name, $title = null, $flickrPhoto = '', $maxLength = null, $form = null) { $this->maxLength = $maxLength; parent::setTemplate('FLickrPhotoSelectionField'); $value = ''; if ($flickrPhoto) { $value = $flickrPhoto->ID; $this->flickrTitle = $flickrPhoto->Title; $this->flickrID = $flickrPhoto->FlickrID; $this->mediumURL = $flickrPhoto->MediumURL; } $this->addExtraClass('flickrPhotoSelectionField'); parent::__construct($name, $title, $value, $form); }