Ferreteria/v0.6/clade/IO/O/View/Web/Row

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | IO‎ | O‎ | View‎ | Web
Jump to navigation Jump to search
The item documented here has been removed and is no longer in use.
clade: IO\O\View\Web\Row
Clade Family
Row Row (none)
Clade Aliases
Alias Clade
Subpages

Code

2026-01-26

Complete contents of file, as removed today:

<?php namespace  Woozalia\Ferret\IO\O\View\Web;
/**
 * HISTORY:
    2024-09-17 created
    2024-10-20 moved from [WF]IO\O\Screen\Render\Web -> IO\O\Render\Web
*/

use Woozalia\Ferret\IO\O\Data\Element\Branch\grid\caRow as BaseClass;
use Woozalia\Ferret\IO\O\Markup\HTML\csTags as TagFx;

class cRow extends BaseClass {
    // ++ CONFIG ++ //

    protected function CellClass() : string { return cCell::class; }

    // -- CONFIG -- //
    // ++ OUTPUT ++ //

    /* 2025-02-08 older version?
    // CEMENT
    public function Render() : string {
        $arCells = $this->GetCells();
        $arAt = $this->GetAttrs();
        $htAt = TagFx::ArrayToAttrs($arAt);
        $htRow = "<tr$htAt>";
        $htCellTag = $this->IsHeader() ? 'th' : 'td';
        foreach ($arCells as $oCell) {
            $htRow .= $oCell->Render();
        }
        $htRow .= "</tr>\n";
        return $htRow;
    }
    */

    // -- OUTPUT -- //
    // ++ OUTPUT ++ //

    // CEMENT
    public function Render() : string {
        $arCells = $this->GetCells();
        $arAt = $this->GetAttrs();
        $htAt = TagFx::ArrayToAttrs($arAt);
        $htRow = "<tr$htAt>";
        $htCellTag = $this->IsHeader() ? 'th' : 'td';
        foreach ($arCells as $oCell) {
            $sVal = $oCell->GetValue();
            $arAt = $oCell->GetAttrs();
            $htAt = TagFx::ArrayToAttrs($arAt);
            $htCell = "<$htCellTag$htAt>$sVal</$htCellTag>";
            $htRow .= $htCell;
        }
        $htRow .= "</tr>\n";
        return $htRow;
    }

    // -- OUTPUT -- //
}

2024-12-04

This was commented out on 2024-10-18:

#
    // 2024-10-18 This was an alternate version found in the Layout class; not sure how/if it still fits in.
    public function Render() : string {
        $arCells = $this->GetCells();
        $htRow = '<tr>';
        $htCellTag = $this->GetIsHeader() ? 'th' : 'td';
        foreach ($arCells as $oCell) {
            $sVal = $oCell->GetValue();
            $arAt = $oCell->GetAttrs();
            $htAt = csElem::ArrayToAttrs($arAt);
            $htCell = "<$htCellTag$htAt>$sVal</$htCellTag>";
            $htRow .= $htCell;
        }
        $htRow .= "</tr>\n";
        return $htRow;
    }