|
|
|
|
@ -25,7 +25,12 @@ namespace OCP\AppFramework\Http\Template; |
|
|
|
|
|
|
|
|
|
use OCP\AppFramework\Http\Template\SimpleMenuAction; |
|
|
|
|
use OCP\Util; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Class LinkMenuAction |
|
|
|
|
* |
|
|
|
|
* @package OCP\AppFramework\Http\Template |
|
|
|
|
* @since 14.0.0 |
|
|
|
|
*/ |
|
|
|
|
class ExternalShareMenuAction extends SimpleMenuAction { |
|
|
|
|
|
|
|
|
|
/** @var string */ |
|
|
|
|
@ -45,6 +50,7 @@ class ExternalShareMenuAction extends SimpleMenuAction { |
|
|
|
|
* @param string $owner |
|
|
|
|
* @param string $displayname |
|
|
|
|
* @param string $shareName |
|
|
|
|
* @since 14.0.0 |
|
|
|
|
*/ |
|
|
|
|
public function __construct(string $label, string $icon, string $owner, string $displayname, string $shareName) { |
|
|
|
|
parent::__construct('save', $label, $icon); |
|
|
|
|
@ -53,6 +59,9 @@ class ExternalShareMenuAction extends SimpleMenuAction { |
|
|
|
|
$this->shareName = $shareName; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @since 14.0.0 |
|
|
|
|
*/ |
|
|
|
|
public function render(): string { |
|
|
|
|
return '<li>' . |
|
|
|
|
'<a id="save-external-share" data-protected="false" data-owner-display-name="' . Util::sanitizeHTML($this->displayname) . '" data-owner="' . Util::sanitizeHTML($this->owner) . '" data-name="' . Util::sanitizeHTML($this->shareName) . '">' . |
|
|
|
|
|