Back to CoreButtonsTrait class

Method mediaManager

public \Joomla\CMS\Toolbar\Button\PopupButton
mediaManager
(string $directory, string $text = 'JTOOLBAR_UPLOAD')
Writes a media_manager button.
Parameters
  • string $directory The subdirectory to upload the media to.
  • string $text An override for the alt text.
Returns
  • \Joomla\CMS\Toolbar\Button\PopupButton
Since
  • 4.0.0

Method mediaManager - Source code

/**
 * Writes a media_manager button.
 *
 * @param   string  $directory  The subdirectory to upload the media to.
 * @param   string  $text       An override for the alt text.
 *
 * @return  PopupButton
 *
 * @since   4.0.0
 */
public function mediaManager(string $directory, string $text = 'JTOOLBAR_UPLOAD') : PopupButton
{
    return $this->popupButton('upload', $text)->iframeWidth(800)->iframeHeight(520)->url('index.php?option=com_media&tmpl=component&task=popupUpload&folder=' . $directory);
}