Cancel form button.

@param string|null $title
@param null|string|array $url
@param array $options
@return void
490067
public static function cancel($title = null, $url = null, array $options = [])
    {
        $toolbar = Toolbar::getInstance(self::$_toolbar);
        $options += [
            'icon'      => 'close',
            'iconClass' => 'ckTextRed',
            'button'    => 'grey lighten-3'
        ];

        if (empty($url)) {
            $url = ['action' => 'index'];
        }

        $title = (empty($title)) ? __d('core', 'Cancel') : $title;

        $toolbar->appendButton('Core.link', $title, $url, $options);
    }
681162
public function cancel($consumerTag, array $options = [])
    {
        $noWait = array_key_exists('noWait', $options) ? $options['noWait'] : null;

        $outputFrame = Basic\BasicCancelFrame::create($consumerTag, $noWait);
        $outputFrame->frameChannelId = $this->id;
        $this->connection->command($outputFrame);
    }
82731
public function prepend($title, $url, array $options = array()) {
        array_unshift($this->_crumbs, array(
            'title' => strip_tags($title),
            'url' => $url,
            'options' => $options
        ));

        $this->OpenGraph->title($this->pageTitle(null, array('reverse' => true)));
        $this->OpenGraph->uri($url);

        return $this;
    }
89656
public static function apply($title = null)
    {
        $toolbar = Toolbar::getInstance(self::$_toolbar);
        $title   = (empty($title)) ? __d('core', 'Apply') : $title;

        $toolbar->appendButton('Core.action', $title, self::ACTION_APPLY, [
            'class'  => 'jsFormButton',
            'icon'   => 'check-square-o',
            'button' => 'green lighten-2',
        ]);
    }
1132945
public static function barDump($var, string $title = null, array $options = null)
    {
        if (!self::isProductionMode()) {
            static $panel;
            if (!$panel) {
                self::getBar()->addPanel($panel = new Bar\DefaultPanel('dumps'), 'Tracy:dumps');
            }
            $panel->data[] = [
                'title' => $title,
                'dump' => Dumper::toHtml($var, $options + [
                        Dumper::DEPTH => self::$maxDepth,
                        Dumper::TRUNCATE => self::$maxLength,
                        Dumper::LOCATION => self::$showLocation ?: Dumper::LOCATION_CLASS | Dumper::LOCATION_SOURCE,
                    ]),
            ];
        }

        return $var;
    }
446928
public function link($title, array $url, array $options = []) {
		if (!$this->hasAccess($url)) {
			return $this->_default($title, $options);
		}
		unset($options['default']);

		return $this->Html->link($title, $url, $options);
	}
1147365
protected static function setPageDetails (string $title=NULL, string $description=NULL)
	{
		self::$title          = $title;
		self::$description    = $description;
	}
148114
public static function secureLink($url, $title = null, $attributes = array())
    {
        $html = self::getInstance()->html;
        $args = func_get_args();
        return call_user_func_array(array($html, __FUNCTION__), $args);
    }
483607
public function postLink($title, array $url, array $options = []) {
		if (!$this->hasAccess($url)) {
			return $this->_default($title, $options);
		}
		unset($options['default']);

		return $this->Form->postLink($title, $url, $options);
	}
770848
public function warning(string $message, string $title = '', array $options = []): self
    {
        return $this->addNotification(self::WARNING, $message, $title, $options);
    }
1245464
public function action($title, $url, $style = '')
    {
        $this->actions[] = [
            'type' => 'button',
            'text' => $title,
            'url' => $url,
            'style' => $style,
        ];

        return $this;
    }
225735
public static function nostyleUrl($title, $url) {
        echo('<a href="'.$url.'" target="_blank" typeof="oer:SupportingMaterial">'.htmlentities($url)."</a>\n");
        if ( isset($_SESSION['gc_count']) ) {
            echo('<div class="g-sharetoclassroom" data-size="16" data-url="'.$url.'" ');
	    echo(' data-title="'.htmlentities($title).'" ');
	    echo('></div>');
        }
    }
894284
public function delete($url, $param = array(), $options = array()) {
        $options['CURLOPT_CUSTOMREQUEST'] = 'DELETE';
        if (!isset($options['CURLOPT_USERPWD'])) {
            $options['CURLOPT_USERPWD'] = 'anonymous: noreply@moodle.org';
        }
        $ret = $this->request($url, $options);
        return $ret;
    }
356245
public static function linkToFeed($url, $title = null)
    {
        $title = Convert::raw2xml($title);
        Requirements::insertHeadTags(
            '<link rel="alternate" type="application/rss+xml" title="' . $title . '" href="' . $url . '" />'
        );
    }
637417
public function cancelSubmit(array &$form, FormStateInterface $form_state)
    {
        if ($this->manager->getPageContext()->isTemporary()) {
            $this->manager->getPageContext()->rollback();

            drupal_set_message($this->t("Changes have been dropped"), 'error');

            $form_state->setRedirect(
                current_path(),
                ['query' => drupal_get_query_parameters(null, ['q', ContextManager::PARAM_PAGE_TOKEN])]
            );
        }
    }
1235170
public function setHome($title, $url=NULL) {
		
		$path			= new \stdClass();
		$path->title	= $title;
		$path->url		= $url;
		$path->active	= count($this->paths) > 1 ? FALSE : TRUE;
		
		$this->paths[0] = $path;
		
	}
1002303
public function addAction($title, $link, array $options = [])
    {
        if (is_array($link)) {
            if (!isset($link['p'])) {
                $link['p'] = P;
            }
            if (!isset($link['do'])) {
                $link['do'] = P_DO;
            }

            // Removed "_default" from main action if called from Main and is the beginning of string
            if (stripos($link['do'], '_default') === 0) {
                $link['do'] = str_replace('_default_', '', $link['do']);
            }

            $link = Linker::makeUrl($link);
        }

        $options['link'] = $link;
        $this->actions[$title] = $options;

        return $this;
    }