Skip to content

Commit

Permalink
📝 BASE update version 5.0.0-alpha25
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Sep 13, 2021
1 parent a914f13 commit 0419447
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 84 deletions.
37 changes: 37 additions & 0 deletions FormDin5/lib/widget/FormDin5/helpers/DateTimeHelper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,43 @@ public static function getNowYYYYMMDD()
return $retorno;
}

public static function getListMesesExtenso($strarWithZero=true)
{
$listMeses = null;
if($strarWithZero==true){
$listMeses = array(
'01' => 'Janeiro'
,'02' => 'Fevereiro'
,'03' => 'Março'
,'04' => 'Abril'
,'05' => 'Maio'
,'06' => 'Junho'
,'07' => 'Julho'
,'08' => 'Agosto'
,'09' => 'Setembro'
,'10' => 'Outubro'
,'11' => 'Novembro'
,'12' => 'Dezembro'
);
}else{
$listMeses = array(
'1' => 'Janeiro'
,'2' => 'Fevereiro'
,'3' => 'Março'
,'4' => 'Abril'
,'5' => 'Maio'
,'6' => 'Junho'
,'7' => 'Julho'
,'8' => 'Agosto'
,'9' => 'Setembro'
,'10' => 'Outubro'
,'11' => 'Novembro'
,'12' => 'Dezembro'
);
}
return $listMeses;
}

public static function mesExtenso($numeroMes)
{
$numeroMes = intval($numeroMes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
class FormDinHelper
{

const FORMDIN_VERSION = '5.0.0-alpha24';
const FORMDIN_VERSION = '5.0.0-alpha25';
const GRID_SIMPLE = 'GRID_SIMPLE';
const GRID_SCREEN_PAGINATION = 'GRID_SCREEN_PAGINATION';
const GRID_SQL_PAGINATION = 'GRID_SQL_PAGINATION';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ class TFormDinCheckList {
* @param boolean $makeScrollable - 7 : DEFAULT = false
* @return TFormDinCheckList
*/
public function __construct($id
, $label
, $boolRequired=false
, $listItems
, $intHeight=null
public function __construct(string $id
,string $label
,mixed $boolRequired=false
,mixed $listItems
,int $intHeight=null
)
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ class TFormDinEmailField extends TFormDinTextField
*
* @return TFormDinEmailField Field
*/
public function __construct( $id
, $label=null
, $intMaxLength
, $boolRequired=null
, $intSize=null
public function __construct( string $id
, string $label=null
, int $intMaxLength
, mixed $boolRequired=null
, int $intSize=null
, $boolNewLine=null
, $strValue=null
, string $strValue=null
, $boolLabelAbove=null
, $boolNoWrapLabel=null
, $placeholder=null
, string $placeholder=null
)
{
parent::__construct($id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,20 @@ class TFormDinSelectField extends TFormDinOption
*/
public function __construct(string $id
,string $label
,$boolRequired = false
,$mixOptions
,$boolNewLine = true
,$boolLabelAbove = false
,$mixValue = null
,$boolMultiSelect = false
,$intQtdColumns = null
,$intWidth = null
,$strFirstOptionText = null
,$strFirstOptionValue = null
,$strKeyColumn = null
,$strDisplayColumn = null
,$boolNoWrapLabel = null
,$strDataColumns = null
,mixed $boolRequired = false
,mixed $mixOptions
,mixed $boolNewLine = true
,mixed $boolLabelAbove = false
,mixed $mixValue = null
,mixed $boolMultiSelect = false
,int $intQtdColumns = null
,int $intWidth = null
,string $strFirstOptionText = null
,string $strFirstOptionValue = null
,string $strKeyColumn = null
,string $strDisplayColumn = null
,mixed $boolNoWrapLabel = null
,string $strDataColumns = null
)
{
$this->setWidth( $intWidth );
Expand Down
69 changes: 35 additions & 34 deletions FormDin5/lib/widget/FormDin5/webform/TFormDin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,20 +488,21 @@ public function addMessage( $message
* @param string $strHorizontalAlign-14 : NOT_IMPLEMENTED Text Horizontal align. DEFAULT = center. Values center, left, right
* @return TButton|string|array
*/
public function addButton( $mixValue
, $strNameId=null
, $strAction
, $strOnClick=null
, $strConfirmMessage=null
, $boolNewLine=null
, $boolFooter=true
, $strImage=null
, $strImageDisabled=null
, $strHint=null
, $strVerticalAlign=null
, $boolLabelAbove=null
, $strLabel=null
, $strHorizontalAlign=null)
public function addButton( string $mixValue
, string $strNameId=null
, string $strAction
, string $strOnClick=null
, string $strConfirmMessage=null
, mixed $boolNewLine=null
, mixed $boolFooter=true
, string $strImage=null
, string $strImageDisabled=null
, string $strHint=null
, string $strVerticalAlign=null
, mixed $boolLabelAbove=null
, string $strLabel=null
, string $strHorizontalAlign=null
)
{
$objForm = $this->getObjForm();
if($boolFooter){
Expand Down Expand Up @@ -1223,20 +1224,20 @@ public function addTimeField( $strName
*/
public function addSelectField(string $id
,string $strLabel
,$boolRequired = false
,array $mixOptions
,$boolNewLine = true
,$boolLabelAbove = false
,$mixValue = null
,$boolMultiSelect = false
,$intSize = null
,$intWidth = null
,$strFirstOptionText = null
,$strFirstOptionValue = null
,$strKeyColumn = null
,$strDisplayColumn = null
,$boolNoWrapLabel = null
,$strDataColumns = null
,mixed $boolRequired = false
,mixed $mixOptions
,mixed $boolNewLine = true
,mixed $boolLabelAbove = false
,mixed $mixValue = null
,mixed $boolMultiSelect = false
,int $intSize = null
,int $intWidth = null
,string $strFirstOptionText = null
,string $strFirstOptionValue = null
,string $strKeyColumn = null
,string $strDisplayColumn = null
,string $boolNoWrapLabel = null
,string $strDataColumns = null
)
{
$formField = new TFormDinSelectField($id
Expand Down Expand Up @@ -1658,9 +1659,9 @@ public function addCheckList( $objCheckList,$boolNewLine = true)
* @param string $decimalsSeparator -19: FORMDIN5: separador decimal. Não pode ser chamado por metodo
* @return TNumber
*/
public function addNumberField( $strName
, $strLabel=null
, $intMaxLength
public function addNumberField( string $strName
, string $strLabel=null
, int $intMaxLength
, $boolRequired=null
, $intDecimalPlaces=null
, $boolNewLine=null
Expand Down Expand Up @@ -1723,9 +1724,9 @@ public function addNumberField( $strName
* @param string $placeholder -09: FORMDIN5: Texto do Place Holder
* @return TFormDinEmailField
*/
public function addEmailField( $strName
, $strLabel=null
, $intMaxLength
public function addEmailField( string $strName
, string $strLabel=null
, int $intMaxLength
, $boolRequired=null
, $intSize=null
, $boolNewLine=null
Expand Down
44 changes: 22 additions & 22 deletions FormDin5/lib/widget/FormDin5/webform/TFormDinGrid.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ public function setId($idGrid){
* @param string $align - 5:
* @return void
*/
public function addElementColumnList($type = self::TYPE_SIMPLE
, string $idcolumn
, string $label
, string $width = NULL
, string $align = 'left'
public function addElementColumnList(string $type = self::TYPE_SIMPLE
,string $idcolumn
,string $label
,string $width = NULL
,string $align = 'left'
)
{
$element = array();
Expand Down Expand Up @@ -535,12 +535,12 @@ public function addColumnFormatDate(string $name
* @param boolean $boolAllowCheckAll - TRUE = pode selecionar todos , FALSE = não permite multiplas seleções
* @return TGridCheckColumn
*/
public function addCheckColumn( $strName
, $strTitle = null
, $strKeyField
, $strDescField = null
, $boolReadOnly = null
, $boolAllowCheckAll = null )
public function addCheckColumn( string $strName
, string $strTitle = null
, string $strKeyField
, string $strDescField = null
, mixed $boolReadOnly = null
, mixed $boolAllowCheckAll = null )
{
if ( !$strKeyField ){
$strKeyField = strtoupper( $strName );
Expand Down Expand Up @@ -586,17 +586,17 @@ public function getMixUpdateButton($mixUpdateButton){
* @param string $classDestiny -11: FORMDIN5: nome da classe que vai tratar ação. o Valor Defualt é propria classe
* @return object TFormDinGridAction
*/
public function addButton( $strRotulo
, $strAction = null
, $strName = null
, $strOnClick = null
, $strConfirmMessage = null
, $strImage = null
, $strImageDisabled = null
, $strHint = null
, $boolSubmitAction = null
, $mixUpdateButton = null
, $classDestiny = null
public function addButton( string $strRotulo
, string $strAction = null
, string $strName = null
, string $strOnClick = null
, string $strConfirmMessage = null
, string $strImage = null
, string $strImageDisabled = null
, string $strHint = null
, mixed $boolSubmitAction = null
, mixed $mixUpdateButton = null
, $classDestiny = null
){
$mixUpdateButton = $this->getMixUpdateButton($mixUpdateButton);
if( empty($mixUpdateButton) ){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class TFormDinPdoConnection
/**
* Facilitardor de conexão com o banco de dados
*
* @param string $database : nome da conexão. É o nome do arquivo INI de configuração do banco
* @param string $database : nome da conexão. É o nome do arquivo INI ou PHP de configuração do banco. Informe NULL para setar cada propriedade manualmente
* @param const $outputMode: DEFAULT = ArrayHelper::TYPE_PDO. ArrayHelper::TYPE_FORMDIN, ArrayHelper::TYPE_ADIANTI
* @param const $fech: DEFAULT = PDO::FETCH_OBJ array de Objet, PDO::FETCH_ASSOC - array simples
* @param const $case use PDO case. DEFAULT = CASE_NATURAL. https://www.php.net/manual/pt_BR/pdo.prepare.php
Expand All @@ -81,6 +81,9 @@ public function __construct($database = null,$outputFormat = null,$fech = null,$
{
if(!empty($database)){
$this->setDatabase($database);
$arrParams = TConnection::getDatabaseInfo($database);
$type = ArrayHelper::get($arrParams,'type');
$this->setDdms($type);
}
$this->setOutputFormat($outputFormat);
$this->setFech($fech);
Expand Down

0 comments on commit 0419447

Please sign in to comment.