CMB2::render_form_close PHP Method

render_form_close() public method

Outputs the closing form markup and runs corresponding hooks: 'cmb2_after_form' and "cmb2_after_{$object_type}_form_{$this->cmb_id}"
Since: 2.2.0
public render_form_close ( integer $object_id, string $object_type = '' ) : void
$object_id integer Object ID
$object_type string Object type
return void
    public function render_form_close($object_id = 0, $object_type = '')
    {
        $object_type = $this->object_type($object_type);
        $object_id = $this->object_id($object_id);
        echo '</div></div>';
        $this->render_hidden_fields();
        /**
         * Hook after form form has been rendered
         *
         * @param array  $cmb_id      The current box ID
         * @param int    $object_id   The ID of the current object
         * @param string $object_type The type of object you are working with.
         *	                           Usually `post` (this applies to all post-types).
         *	                           Could also be `comment`, `user` or `options-page`.
         * @param array  $cmb         This CMB2 object
         */
        do_action('cmb2_after_form', $this->cmb_id, $object_id, $object_type, $this);
        /**
         * Hook after form form has been rendered
         *
         * The dynamic portion of the hook name, $this->cmb_id, is the meta_box id.
         *
         * The first dynamic portion of the hook name, $object_type, is the type of object
         * you are working with. Usually `post` (this applies to all post-types).
         * Could also be `comment`, `user` or `options-page`.
         *
         * @param int    $object_id   The ID of the current object
         * @param array  $cmb         This CMB2 object
         */
        do_action("cmb2_after_{$object_type}_form_{$this->cmb_id}", $object_id, $this);
        echo "\n<!-- End CMB2 Fields -->\n";
    }