REST_Element_Types_Controller::__construct( awsmug\Torro_Forms\DB_Objects\Elements\Element_Manager $manager )

Constructor.

Description

Parameters

$manager

(awsmug\Torro_Forms\DB_Objects\Elements\Element_Manager) (Required) The manager instance.

Source

File: src/db-objects/elements/element-types/rest-element-types-controller.php

	public function __construct( $manager ) {
		$this->manager = $manager;

		$prefix = $this->manager->get_prefix();
		if ( '_' === substr( $prefix, -1 ) ) {
			$prefix = substr( $prefix, 0, -1 );
		}

		$this->namespace = $prefix . '/v1';
		$this->rest_base = $this->manager->get_plural_slug() . '/types';
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.