Prose\UsingForm::initActions PHP Method

initActions() protected method

protected initActions ( )
    protected function initActions()
    {
        // call our parent initActions() first
        parent::initActions();
        // shorthand
        $formId = $this->args[0];
        // find the form
        $formElement = fromBrowser()->get()->elementById($formId);
        // is it really a form?
        if (strtolower($formElement->name()) !== 'form') {
            throw new E5xx_ActionFailed(__METHOD__, "expected form element, got element '" . $formElement->name() . "'");
        }
        // yes, it really is a form
        $this->formId = $formId;
        $this->setTopElement($formElement);
    }