<?php
namespace nur\v\bs3\fo;

use nur\A;
use nur\b\params\Tparametrable;

class ControlTitle extends ControlVisual {
  use Tparametrable;

  const PARAMETRABLE_PARAMS_SCHEMA = [
    "title" => ["?content", null, "texte du titre"],
  ];

  /** @var array|string */
  protected $ppTitle;

  function getLayout(array $control): array {
    return $this->getFgsLayout($control, true);
  }

  function getControl(): array {
    $control = A::with(q($this->ppTitle));
    if ($this->ppNaked) return $control;
    else return $this->getLayout($control);
  }
}