ElggMenuItem::setConfirmText PHP Method

setConfirmText() public method

Set the confirm text shown when link is clicked
public setConfirmText ( string $text ) : void
$text string The text to show
return void
    public function setConfirmText($text)
    {
        $this->confirm = $text;
    }

Usage Example

示例#1
0
文件: hooks.php 项目: n8b/VMN
function hover_menu($hook, $type, $return, $params)
{
    $user = $params['entity'];
    if ($user->spam_throttle_suspension > time() && elgg_is_admin_logged_in()) {
        $url = "action/spam_throttle/unsuspend?guid={$user->guid}";
        $item = new \ElggMenuItem("spam_throttle_unsuspend", elgg_echo("spam_throttle:unsuspend"), $url);
        $item->setConfirmText(elgg_echo('spam_throttle:unsuspend:confirm'));
        $item->setSection('admin');
        $return[] = $item;
    }
    return $return;
}
All Usage Examples Of ElggMenuItem::setConfirmText