コード例 #1
0
 public function getFields()
 {
     $fields = parent::getFields();
     $fields->removeByName('CaptionText', true);
     return $fields;
 }
コード例 #2
0
 public function __construct($url, $file = null)
 {
     parent::__construct($url, $file);
     $this->iframe = $url;
 }
コード例 #3
0
 public function __construct($url, $file = null)
 {
     parent::__construct($url, $file);
     // Get dimensions for remote file
     $info = @getimagesize($url);
     if ($info) {
         $this->width = $info[0];
         $this->height = $info[1];
     }
 }
 /**
  * Performs the initial request to load the video details
  * @param {string} $url Vidyard Video URL
  * @param {File} $file File Object
  */
 public function __construct($url, $file = null)
 {
     HtmlEditorField_File::__construct($url, $file);
     $this->oembed = Vidyard::get_video_from_url($this->url);
     if (!$this->oembed) {
         $controller = Controller::curr();
         $controller->response->addHeader('X-Status', rawurlencode(_t('HtmlEditorField.URLNOTANOEMBEDRESOURCE', "The URL '{url}' could not be turned into a media resource.", "The given URL is not a valid Vidyard video; the embed element couldn't be created.", array('url' => $url))));
         $controller->response->setStatusCode(404);
         throw new SS_HTTPResponse_Exception($controller->response);
     }
 }