*/
public $responsiveUrls = array();
- /** @var File object */
+ /** @var File */
protected $file;
/** @var int Image width */
}
/**
- * @return File file
+ * @return File
*/
public function getFile() {
return $this->file;
throw new MWException( __METHOD__ . ' called in the old style' );
}
- $alt = empty( $options['alt'] ) ? '' : $options['alt'];
+ $alt = isset( $options['alt'] ) ? $options['alt'] : '';
- $query = empty( $options['desc-query'] ) ? '' : $options['desc-query'];
+ $query = isset( $options['desc-query'] ) ? $options['desc-query'] : '';
if ( !empty( $options['custom-url-link'] ) ) {
$linkAttribs = array( 'href' => $options['custom-url-link'] );
$attribs['srcset'] = Html::srcSet( $this->responsiveUrls );
}
- wfRunHooks( 'ThumbnailBeforeProduceHTML', array( $this, &$attribs, &$linkAttribs ) );
+ Hooks::run( 'ThumbnailBeforeProduceHTML', array( $this, &$attribs, &$linkAttribs ) );
return $this->linkWrap( $linkAttribs, Xml::element( 'img', $attribs ) );
}