Conn2Flow
Docs navigation

Reference / Libraries

controles.php library

Shared administrative controls, native form elements and input masks.

Path in the Gestor bibliotecas/controles.php

Helpers return HTML; JavaScript enhances behavior while retaining native form submission. Panel conventions describe classes, masks, floating selects and formatted messages.

  • controles_textos: Reads global controles-* variables for JS.

  • controles_incluir: Queues CSS, runtime, masks and texts once per page.

  • controles_esc: Escapes values using ENT_QUOTES and UTF-8.

  • controles_select: Builds a native select, options/groups, search, multiple selection and AJAX configuration.

  • controles_chave: Builds a checkbox; optionally includes a hidden zero value when disabled.

  • controles_abas: Escapes labels; prepared content is unescaped HTML.

  • controles_atributos: Validates names; true becomes a valueless attribute, false/null are omitted.

  • controles_campo: Groups label, help, error and aria-describedby; types include text, area, select and switch.

  • controles_botao: Builds a button with variant and Lucide icon; escapes the label.

Control runtime

The internal observarSelects observer initializes selects inserted after page load and rebuilds cloned control wrappers, whose events are not copied by cloneNode. Selects inside template are excluded until inserted into the document. Selection retains the native select for form submission.

c2fControles.formatado allows only b, strong, i, em, u, br and code, without attributes. Percentage and currency masks are loaded by controles_incluir: they display pt-BR numbers and submit decimals with a dot during formdata; percentages are limited to 0–100 with two decimal places.

Generated function reference

Generated from gestor/bibliotecas/controles.php · 9 functions

9 of 9

controles_select

view source · line 52 ↗
controles_select(array $params)

Select com busca (e AJAX, opcional) sobre um <select> nativo.

Parameters

$paramsarray
name, id, opcoes ([valor => rótulo] ou [['valor','rotulo','grupo']]), valor (string ou lista),

controles_abas

view source · line 112 ↗
controles_abas(array $abas, $ativa = null)

Abas: [['id' => 'dados', 'rotulo' => '...', 'conteudo' => '<html já pronto>'], ...]. O conteúdo é HTML do próprio sistema (não escapado); os rótulos são escapados.

Parameters

$abasarray
$ativa

controles_campo

view source · line 150 ↗
controles_campo(array $p)

Campo completo do formulário.

Parameters

$parray
tipo (texto|email|senha|numero|data|data-hora|url|area|select|chave|oculto), name, id, rotulo, ajuda,

controles_botao

view source · line 197 ↗
controles_botao(array $p)

Botão padrão. variante: primario (padrão) | secundario | perigo | fantasma; tipo: button|submit; url vira <a>. icone é o nome de um ícone Lucide (data-lucide), desenhado pelo layout.

Parameters

$parray

The Future is Hybrid: Human + AI.

Conn2Flow is the tool. If you need the Architect to design your company's strategy using this technology...

Hire Specialized Consulting