@method tbody()

Seta o conteúdo da tabela

@param array(matriz) $tbody

@return InterfaceElement(Table)
430184
public function tbody(array $tbody)
    {
        if (!is_array($tbody)) {
            throw new \Exception('Parametro inválido! O valor esperado é uma matriz.');
        }

        foreach ($tbody as $row) {
            if (!is_array($row)) {
                throw new \Exception('Parametro inválido! O valor esperado é uma matriz.');
            }
        }

        $this->tbody = $tbody;

        return $this;
    }
1361077
def render_tbody
      if @lines and @lines.size > 0
        return Tools::html_safe(content_tag(:tbody, render_total_entries + Tools::html_safe(@lines.collect { |line| line.render_line }.join)))
        return Tools::html_safe(content_tag(:tr, content_tag(:td, I18n.t(:total_entries, :scope => :sorting_table_for, :value => total_entries), {:colspan => max_cells}), { :class => 'total-entries' }))
      end
      ''
    end
697514
public function getJs(string $table_id): string
    {
        ob_start();
        $this->getTreeJs();

        if (!$this->ajax_path) {
            $this->ajax_path = '?p='. P .'&do=' . P_DO;
        }

        ?>
        <script>
            var <?= $this->js_object_name ?> =
            new TableTree('<?= $table_id ?>', <?=json_encode($this->child_ids)?>, <?= json_encode($this->js_object_name, JSON_OBJECT_AS_ARRAY) ?>, '<?= $this->ajax_path ?>', <?= (int)$this->ajax ?>, <?= (int)$this->save_inner_state ?>);
        </script><?php

        return ob_get_clean();
    }
57597
public function addReadBy($userOrId)
    {
        if ($userOrId instanceof UserInterface) {
            $userOrId = $userOrId->getId();
        }
        if (!in_array($userOrId, $this->readBy)) {
            $this->readBy[] = $userOrId;
        }
        return $this;
    }
1366693
public static function table($data, $params = array())
    {
        $defParams = array(
            'ajax' => false,
            'tfoot' => false,
            'table@' => array('class' => 'table'),
            'thead@' => array(),
            'tbody@' => array(),
            'tfoot@' => array()
        );

        $params = array_merge_recursive($defParams, $params);


        if (is_array($data)) {

            $html = '<table ' . Html::attributes($params['table@']) . '><thead ' . Html::attributes($params['thead@']) . '><tr>';
            foreach (reset($data) as $key => $name) {
                $html .= '<th>' . $key . '</th>';
            }
            $html .= '</tr></thead><tbody>';

            if ($params['ajax'] != true) {

                foreach ($data as $key => $row) {

                    $html .= '<tr>';
                    foreach ($row as $key => $col) {
                        $html .= '<td>' . $col . '</td>';
                    }
                    $html .= '</tr>';
                }
            } else {
                $html .= '<!--AJAXCALL-->';
            }
            $html .= '</tbody>';

            $html .= '</table>';

            return $html;
        }
    }
961581
public function join($table, $condition, $joinType = self::JOIN_LEFT)
    {
        $this->join[] = [
            'table' => $table,
            'condition' => $condition,
            'jointType' => $joinType
        ];
        return $this;
    }
185544
public function select($tbl, $where, $options = array()){
		return $this->crud->select($tbl, $where, $options);
	}
1266
public function setData($data)
    {
        foreach ($data as $key => $dtoData) {
            $this->data[$key] = new ItemDto($dtoData);
        }
    
        return $this;
    }
359154
public function getJory(): Jory
    {
        (new ArrayValidator($this->joryArray))->validate();

        $jory = new Jory();
        $this->setFilters($jory);
        $this->setRelations($jory);
        $this->setSorts($jory);
        $this->setOffset($jory);
        $this->setLimit($jory);
        $this->setFields($jory);

        return $jory;
    }
369401
public function tablehead($what='', $qry='', $order='', $addbutton='', $fields=[], $sort=[], $tips=[])
    {
            $out.="
                <table class='table table-bordered table-striped-tr table-morecondensed tooltip-demo  table-notfull' id='sortableTable'>
                <thead  class='c'>
                <tr>
                    ";
        if ($what!='') {
            $out.="<th><a href='?act=search&what=$what' class='c'><i class='icon-search'></i></a></th>";
        }
            $i=0;
        foreach ($fields as $field) {
            $field=strtolower($field);
            if ($tips[$i]!="") {
                $tip="data-original-title='$tips[$i]'";
            } else {
                $tip="";
            }
            if ($sort[$i]!="") {
                $out.=" <th class='tooltip-test' $tip><a href='?$qry&sortby=$sort[$i]$order' TITLE='Sort'>".ucfirst($field)."</a></th>";
            } else {
                $out.=" <th class='tooltip-test' $tip>".ucfirst($field)."</th>";
            }
            $i++;
        }
        if ($what!='') {
            $out.="<th style='text-align: center; width: 50px;'>$addbutton</th>";
        }
            $out.="</tr>
                    </thead>
                    <tbody>";
        return $out;
    }
356274
public function add(ElementInterface $element)
    {
        if (null === $element->getName()) {
            $this->data[] = $element;
            return $this;
        }
        $this->data[$element->getName()] = $element;
        return $this;
    }
929348
public function getComponentByDbId($dbId, $select = array())
    {
        $components = $this->getComponentsByDbId($dbId, $select);
        $this->_checkSingleComponent($components);
        if (isset($components[0])) {
            return $components[0];
        }
        return null;
    }
266551
public function insertInto($table) {
        $obj = new InsertRule(new Context($this->connection));
        return $obj->insertInto($table);
    }
472852
public function indexBy($indexBy)
    {
        if (is_array($indexBy)) {
            $this->select([key($indexBy), current($indexBy)]);
        }

        $this->_index = $indexBy;

        return $this;
    }
582587
public function addInToolbar($element,$callback=NULL){
		$tb=$this->getToolbar();
		if($element instanceof BaseWidget){
			if($element->getIdentifier()===""){
				$element->setIdentifier("tb-item-".$this->identifier."-".$tb->count());
			}
		}
		if(isset($callback)){
			if(\is_callable($callback)){
				$callback($element);
			}
		}
		return $tb->addItem($element);
	}
809920
public function setTty($tty)
    {
        if ('\\' === DIRECTORY_SEPARATOR && $tty) {
            throw new RuntimeException('TTY mode is not supported on Windows platform.');
        }
        if ($tty) {
            static $isTtySupported;

            if (null === $isTtySupported) {
                $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', array(array('file', '/dev/tty', 'r'), array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w')), $pipes);
            }

            if (!$isTtySupported) {
                throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.');
            }
        }

        $this->tty = (bool) $tty;

        return $this;
    }
193415
function(html, doc) {
                var frag = create(TABLE_OPEN + html + TABLE_CLOSE, doc),
                    tb = frag.children.tags('tbody')[0];

                if (frag.children.length > 1 && tb && !re_tbody.test(html)) {
                    tb[PARENT_NODE].removeChild(tb); // strip extraneous tbody
                }
                return frag;
            }