WebFioriAPI ReferenceLearnDownloadContributeLearn{{result.parent_page}} > {{result.title}}{{result.title}}Classes{{result.class_name}}{{result.summary}}Methods{{result.name}}{{result.summary}}

namespace \webfiori\ui

class TableRow

Class Methods Summary

public function __construct()Creates new instance of the row.public function addCell(string|TableCell|HTMLNode$cellContent, string$type, boolean$escEntities, array$attrs)Adds new cell to the row.public function addChild(TableCell|string$node, array|boolean$attrs, boolean$chainOnParent)Adds new child node to the row.public function getCell(int$index)Returns a table cell given its index.public function setData(array$data, boolean$headerData)Adds a data to the row.

Class Methods Details

public function __construct()Creates new instance of the row. public function addCell(string|TableCell|HTMLNode$cellContent, string$type, boolean$escEntities, array$attrs)Adds new cell to the row.

Parameters:

  • string|TableCell|HTMLNode $cellContent The text of cell body. It can have HTML. Also, it can be an object of type 'TableCell' or an object of type 'HTMLNode'.
  • string $type The type of the cell. This attribute can have only one of two values, 'td' or 'th'. 'td' If the cell is in the body of the table and 'th' if the cell is in the header. If none of the two is given, 'td' will be used by default.
  • boolean $escEntities If set to true and cell text is provided, the method will replace the characters '<', '>' and '&' with the following HTML entities: '<', '>' and '&' in the given text. Default is false.
  • array $attrs An associative array of attributes which will be set for the added cell.
Returns: TableRowThe method will return the instance at which the method is called on.
public function addChild(TableCell|string$node, array|boolean$attrs, boolean$chainOnParent)Adds new child node to the row. The node will be added only if its an instance of the class 'TableCell'.

Parameters:

  • TableCell|string $node New table cell. This also can be a string such as 'td' or 'th'.
  • array|boolean $attrs An optional array of attributes which will be set in the newly added child. This also can act as last method parameter if it is given as boolean.
  • boolean $chainOnParent If this parameter is set to true, the method will return the same instance at which the child node is added to. If set to false, the method will return the child which have been added. This can be useful if the developer would like to add a chain of elements to the body of the node. Default value is true.
Returns: TableCell|TableRow|nullIf the parameter $useChaining is set to true, the method will return the '$this' instance. If set to false, it will return the newly added child. If the given parameter is not an instance of 'TableCell' or a string that does not represents a table cell, the method will return null.
public function getCell(int$index)Returns a table cell given its index.

Parameters:

  • int $index Cell index starting from 0.
Returns: TableCell|nullIf the cell does exist, the method will return an object of type 'TableCell'. If cell does not exist, the method will return null.
public function setData(array$data, boolean$headerData)Adds a data to the row. This method works as follows, if the parent element of the row is of type 'HTMLTable', the method will remove all data which is currently set. After that, it checks the number of columns of the parent and add elements based on that. If the elements are less, the remaining cells will be filled with the string '-'. If the array elements are more, the extra ones are stripped. If the parent is not of type 'HTMLTable', the data will be added without size check.

Parameters:

  • array $data An array that holds the data as strings or objects of type 'HTMLNode'.
  • boolean $headerData If set to true, the method will add the data in a 'th' cell instead of 'td' cell. Default is false.
mdi-menuAll Classesmdi-chevron-leftAnchorBrCodeSnippetHTMLDocHTMLListHTMLNodeHTMLTableHeadNodeInputJsCodeLabelListItemOrderedListParagraphRadioGroupTableCellTableRowUnorderedListInvalidNodeNameExceptionTemplateNotFoundExceptionCaseConverterJsonJsonConverterJsonIJsonTypesPropertyAPIFilterAbstractWebServiceManagerInfoServiceParamTypesRequestRequestParameterResponseUriWebServicesManagerAccessAutoLoaderConfigConfigControllerDBEAbstractWebServiceExtendedWebServicesManagerFileLoggerPrivilegePrivilegesGroupThemeThemeLoaderUploadFileUploaderUserUtilWebFioriAppLanguageErrorBoxHTTPCodeViewMessageBoxServerErrViewStarterPageWebPageDatabaseSessionStorageDefaultSessionStorageMSSQLSessionDataTableMSSQLSessionsTableMySQLSessionDataTableMySQLSessionsTableSessionSessionOperationsSessionStorageSessionsManagerRouterRouterUriAbstractMiddlewareMiddlewareManagerEmailMessageSMTPAccountSMTPServerClassLoaderExceptionFileExceptionInitializationExceptionInvalidCRONExprExceptionMissingLangExceptionNoSuchThemeExceptionRoutingExceptionSMTPExceptionSessionExceptionUIExceptionAbstractJobCronCronEmailCronJobJobArgumentCronLoginViewCronTasksViewCronViewCronLoginServiceCronLogoutServiceCronServicesManagerForceCronExecutionServiceGetJobsServiceCLICLICommandInputStreamOutputStreamStdInStdOutClassWriterLangClassWriterQueryClassWriterServiceHolderThemeClassWriterWebServiceWriterCreateCLIClassHelperCreateCronJobCreateMiddlewareCreateTableCreateTableObjCreateThemeHelperCreateWebServiceAddCommandCreateCommandCronCommandHelpCommandListCronCommandListRoutesCommandListThemesCommandRunSQLQueryCommandSettingsCommandTestRouteCommandUpdateSettingsCommandUpdateTableCommandVersionCommandAbstractQueryColumnColumnFactoryConditionConnectionConnectionInfoDatabaseDatabaseExceptionDateTimeValidatorEntityMapperExpressionForeignKeyJoinTableResultSetSelectExpressionTableWhereExpressionMySQLColumnMySQLConnectionMySQLQueryMySQLTableMSSQLColumnMSSQLConnectionMSSQLQueryMSSQLTableAbstractCollectionComparableLinkedListNodeQueueStack
Powered By: WebFiori Framework, Vue and VuetifyAll Rights Reserved © 2018 - 2024