Añade un profile al stack

@param string   $name
@param callable $callback

@return \PlanB\Utils\Options\Options
499288
public function addProfile(string $name, callable $callback): self
    {
        $this->mapOfProfiles->put($name, $callback);

        return $this;
    }
1248341
public static function make($name, Closure $callback = null)
    {
        $menu = new self($name);
        if ( ! is_null($callback)) {
            call_user_func($callback, $menu);
        }

        return $menu;
    }
971347
private function withOptionReference($name, $callback)
    {
        if (!$this->options) {
            $this->options = new ArrayObject();
        }

        return $this->withVariableReference($this->options, $name, $callback);
    }
477491
public static function createCallback(string $name, callable $callback): NormalizationFieldMappingBuilderInterface
    {
        $self = new self($name);
        $self->fieldNormalizer = new CallbackFieldNormalizer($callback);

        return $self;
    }
489929
public function add(string $name, callable $callback): self
    {
        call_user_func($this->addCallback, $name, $callback);
        return $this;
    }
243042
public function addTab($name, $callback = null)
    {
        $c = parent::addTab($name, $callback);

        return $c->add([$this->formLayout, 'form' => $this->form]);
    }
1290153
public function onBoot($name, Closure $callback)
    {
        $priority              = $this->getPluginPriority($name, 1);
        $this->bootCallbacks[] = compact('name', 'priority', 'callback');
    }
353285
protected function reset(string $name, callable $callback = null)
    {
        if (!isset($this->cache[$name])) {
            return;
        }

        if ($callback !== null) {
            call_user_func($callback, $name, $this->cache[$name]);
        }

        unset($this->cache[$name]);
    }
1370114
public function modify($name, Closure $callback)
    {
        $menu = collect($this->menus)->filter(function ($menu) use ($name) {
            return $menu->getName() == $name;
        })->first();

        $callback($menu);
    }
907375
public function make(string $name, ?Closure $callback = null) : Collection {
        return $this->collection($name, $callback);
    }
694175
protected function buildControl($name, $callback = null, $type = null)
    {
        list($label, $name, $callback) = $this->buildFluentAttributes($name, $callback);

        $control = new Field([
            'id'         => $name,
            'name'       => $name,
            'value'      => null,
            'label'      => $label,
            'attributes' => [],
            'options'    => [],
            'checked'    => false,
            'type'       => $type,
            'field'      => null,
        ]);
        is_callable($callback) && call_user_func($callback, $control);

        return [$name, $control];
    }
1184511
public function addModifier($name, $callback)
    {
        if (!is_callable($callback)) {
            throw new InvalidArgumentException('Invalid argument type. Callbacks must be callable.');
        }
        $this->modifiers[$name] = $callback;
        return $this;
    }
1012558
public function create($name, $callback)
    {
        $this->_name = $name;
        $this->_class = $callback();

        $GLOBALS['providers'][$this->_name] = $this->_class;
    }
126003
public function of($name, Closure $callback = null)
    {
        if (!isset($this->names[$name])) {
            $this->names[$name]       = $this->make($callback);
            $this->names[$name]->name = $name;
        }
        $form = $this->names[$name];
        event('form.' . $name, [&$form]);
        event(new Form($name, $form));
        return $form;
    }
762522
public function register($name, Closure $callback)
    {
        $this->checkCallbackName($name);

        $this->callbacks[$name] = $callback;

        return $this;
    }
423741
protected function buildBasic($name, Closure $callback = null): void
    {
        if ($name instanceof Closure) {
            $callback = $name;
            $name = null;
        }

        ! empty($name) && $this->legend($name);

        $callback($this);
    }
500217
public function register($name, ?callable $callback = null): AuthorizationContract
    {
        if (\is_callable($name)) {
            $callback = $name;
            $name = null;
        }

        $instance = $this->make($name);

        $callback($instance);

        return $instance;
    }