Fire the hooks to add field type in to the CMB2.

@param string   $name
@param callable $callback
@param callable $sanitizer
426819
public static function fire( $name, callable $callback, $sanitizer = null ) {
		add_action( "cmb2_render_{$name}", static::get_render_callback( $callback ), 10, 5 );

		if ( ! is_null( $sanitizer ) && is_callable( $sanitizer ) ) {
			add_filter( "cmb2_sanitize_{$name}", static::get_sanitize_callback( $sanitizer ), 10, 5 );
		}
	}
95916
public function javascript($name, Closure $callback = null)
    {
        return $this->add($name, function($asset) use ($callback)
        {
            $asset->setGroup('javascripts');

            is_callable($callback) and call_user_func($callback, $asset);
        });
    }
210475
public function addActionCallback($key, $name, $callback = null)
	{
		$this->addActionCheck($key);

		$params = ['__id' => $this->primary_key];

		$this->actions[$key] = $action = new Column\ActionCallback($this, $key, $name, $params);

		if ($callback) {
			if (!is_callable($callback)) {
				throw new DataGridException('ActionCallback callback has to be callable.');
			}

			$action->onClick[] = $callback;
		}

		return $action;
	}
854006
public function virtual(string $name, string $type, callable $callback): void {
    $this->virtuals[$name] = new VirtualField($name, $type, $callback);
  }
1334676
@Override
    public void registerDestructionCallback(String name, Runnable callback) {
        synchronized (this) {
            destructionCallbacks.put(name, callback);
        }
    }
415629
public function add(string $name, callable $callback): \IvoPetkov\BearFrameworkAddons\ServerRequests
    {
        $this->callbacks[$name] = $callback;
        return $this;
    }
120768
protected function addTwigFilter($name, $callback, $options = [])
    {
        // If we pass a callback as a simple string, we need to turn it into an array.
        if (is_string($callback) && method_exists($this, $callback)) {
            $callback = [$this, $callback];
        }

        $safe = method_exists($this, 'isSafe') && $this->isSafe();
        if (isset($options['safe'])) {
            $safe = (bool) $options['safe'];
            unset($options['safe']);
        }

        $this->twigFilters[] = new TwigFilter($name, $callback, $options);

        if ($safe) {
            $this->safeFilterNames[] = $name;
        }
    }
884969
public function setService($name, $callback, $protected = false)
    {
        if ($this->hasService($name) && $this->isProtected($name)) {
            throw new ErrorException(
                sprintf('Over-write service "%s" is forbidden!', $name)
            );
        }
        if ($this->_validateService($name, $callback)) {
            $this->_services->setEntry($name, $callback);
            if ($protected) {
                $this->setProtected($name);
            }
        }
        return $this;
    }
1290153
public function onBoot($name, Closure $callback)
    {
        $priority              = $this->getPluginPriority($name, 1);
        $this->bootCallbacks[] = compact('name', 'priority', 'callback');
    }
485073
protected function postInternal($name = null, $default = null, Sanitize $sanitize = null)
    {
        return $this->sanitizeValue($this->rawPostInternal($name, $default), $sanitize);
    }
572215
public function getPlaceholder($name, $sanitize = null)
    {
        list($name, $placeholders, $template) = $this->getParentPlaceholder($name);
        if ($template === false) {
            if ($this->throwException) {
                if (is_array($name)) {
                    $name = implode('.', $name);
                }
                throw new TemplateException("Unknown scope: {$name}");
            }
            return null;
        }
        return $this->sanitize(ArrayHelper::getValue($placeholders, $name), $sanitize);
    }
541532
public function register($name, Closure $callback): void
    {
        if ($this->has($name)) {
            $this->callbacks = $this->callbacks->put($name, $this->callbacks->get($name, collect())->push($callback));
        } else {
            $builder = new MenuGenerator();

            $builder->setViewFactory($this->viewFactory);

            $this->menus->put($name, $builder);

            $this->callbacks = $this->callbacks->put($name, $this->callbacks->get($name, collect())->push($callback));
        }
    }
1198736
public function register($name, $callback)
    {
        $this->widgets[$name] = $callback;

        $this->registerBlade($name);
    }
675103
public function when($name, callable $callback, callable $default = null, array $context = [])
    {
        if ($this->isActive($name, $context)) {
            return $callback($this->params($name), $context);
        } elseif ($default) {
            return $default($this->params($name), $context);
        }

        return $this;
    }
462331
public function addResolver(string $name, callable $callback)
    {
        //if it's a closure, they meant to bind the callback
        if ($callback instanceof Closure) {
            //so there's no scope
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->getResolverHandler()->register($name, $callback);

        return $this;
    }
148328
public function of($name, $callback = null)
    {

        $type = $this->definition['name'];

        if (is_null($type) || !property_exists($this, $type)) {
            throw new RuntimeException('Not supported.');
        } elseif (!isset($this->keyMap[$name])) {
            throw new InvalidArgumentException("Name [{$name}] is not available.");
        }

        $id = $this->keyMap[$name];

        if (is_callable($callback)) {
            call_user_func($callback, $this->{$type}[$id]);
        }


        return $this->{$type}[$id];
    }
1232615
public function register_block($name, $callback, $cacheable = true, $cache_attrs = null)
    {
        if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_BLOCK) {
            throw new Exception('Multiple plugins of different types can not share the same name');
        }
        $this->plugins[$name] = array(
            'type'     => self::SMARTY_BLOCK,
            'callback' => $callback
        );
    }