src/Traits/TableTrait.php
protected function renderHeaderColumn(string $label, string $attributeName, string $dataType = "text") : string
    {
        $this->getTableAttributes();
        $inputAttr = [
            "data-parent" => $this->tableAttributes['id'], //"traktCollectionTable",
            "data-attribute" => $attributeName,
            "data-sort" => "ASC",
            "data-type" => $dataType,
            "class" => "infiniteScrollTableHeaderLink",
        ];
        
        $inputField = "";
        if ($dataType !== null) {
            $fieldAttr = [
                "size" => strlen($label),
            ];
            $inputField = H::input($attributeName, $dataType, null, $fieldAttr);
        }
        
        return H::span($label, $inputAttr).$inputField;
    }
protected function renderHeaderColumn(string $label, string $attributeName, string $dataType = "text") : string
    {
        $this->getTableAttributes();
        $inputAttr = [
            "data-parent" => $this->tableAttributes['id'], //"traktCollectionTable",
            "data-attribute" => $attributeName,
            "data-sort" => "ASC",
            "data-type" => $dataType,
            "class" => "infiniteScrollTableHeaderLink",
        ];
        
        $inputField = "";
        if ($dataType !== null) {
            $fieldAttr = [
                "size" => strlen($label),
            ];
            $inputField = H::input($attributeName, $dataType, null, $fieldAttr);
        }
        
        return H::span($label, $inputAttr).$inputField;
    }
protected function renderHeaderColumn ( string $ label , string $ attributeName , string $ dataType = "text" ) : string { $ this -> getTableAttributes ( ) ; $ inputAttr = [ "data-parent" => $ this -> tableAttributes [ 'id' ] , //"traktCollectionTable", "data-attribute" => $ attributeName , "data-sort" => "ASC" , "data-type" => $ dataType , "class" => "infiniteScrollTableHeaderLink" , ] ; $ inputField = "" ; if ( $ dataType !== null ) { $ fieldAttr = [ "size" => strlen ( $ label ) , ] ; $ inputField = H :: input ( $ attributeName , $ dataType , null , $ fieldAttr ) ; } return H :: span ( $ label , $ inputAttr ) . $ inputField ; }
Render a single Header Column
@param string $label
@param string $attributeName
@param string $dataType   set to null for no input, text for input
@return string
Render a single Header Column