final public function definition() {
        $plugin = $this->_customdata['lock'];

        $this->_form->addElement('hidden', 'action', 'newlockinstance');
        $this->_form->setType('action', PARAM_ALPHANUMEXT);
        $this->_form->addElement('hidden', 'lock', $plugin);
        $this->_form->setType('lock', PARAM_COMPONENT);
        $this->_form->addElement('text', 'name', get_string('lockname', 'cache'));
        $this->_form->setType('name', PARAM_ALPHANUMEXT);
        $this->_form->addRule('name', get_string('required'), 'required');
        $this->_form->addElement('static', 'namedesc', '', get_string('locknamedesc', 'cache'));

        $this->plugin_definition();

        $this->add_action_buttons();
    }