Manager_With_Parents_Trait::add_parent_manager( string $slug, Leaves_And_Love\Plugin_Lib\DB_Objects\Manager $manager )

Adds a parent manager.

Description

Parameters

$slug

(string) (Required) Parent manager identifier.

$manager

(Leaves_And_Love\Plugin_Lib\DB_Objects\Manager) (Required) Parent manager instance.

Return

(bool) True on success, false on failure.

Source

File: src/db-objects/manager-with-parents-trait.php

	public function add_parent_manager( $slug, $manager ) {
		if ( ! is_a( $manager, Manager::class ) ) {
			return false;
		}

		$this->parent_managers[ $slug ] = $manager;

		return true;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.