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

namespace \webfiori\ui

class CodeSnippet

Class Methods Summary

public function __construct(string$title, string$code)Creates new instance of the class.public function addCodeLine(string$codeAsTxt)Adds new line of code to the code snippit.public function getCodeElement()Returns the node that contains the code that will be shown by the snippit.public function getOriginalCode()Returns the original text which represents the code.public function getOriginalTitle()Returns the original code title as supplied for the method CodeSnippit::setTitle().public function getTitle()Returns the title of the code snippit.public function setCode(string$code)Sets the code that will be displayed by the snippit block.public function setTitle(string$title)Sets the title of the snippit.

Class Methods Details

public function __construct(string$title, string$code)Creates new instance of the class.

Parameters:

  • string $title The title of the snippit. This will appear at the top of the element. It can be something like 'PHP Code' or 'Java Code'.
  • string $code The code that will be displayed by the snippit.
public function addCodeLine(string$codeAsTxt)Adds new line of code to the code snippit.

Parameters:

  • string $codeAsTxt The code line. It does not have to include "\n" character as the method will append it automatically to the string.
public function getCodeElement()Returns the node that contains the code that will be shown by the snippit. Returns: HTMLNodeThe node that contains the code that will be shown by the snippit.public function getOriginalCode()Returns the original text which represents the code. Returns: stringThe original text that represents the code.public function getOriginalTitle()Returns the original code title as supplied for the method CodeSnippit::setTitle(). Returns: stringThe original code title as supplied for the method CodeSnippit::setTitle().public function getTitle()Returns the title of the code snippit. Returns: stringThe title of the code snippit. Note that The title which will be returned by this method will have HTML special characters escaped.public function setCode(string$code)Sets the code that will be displayed by the snippit block.

Parameters:

  • string $code The code. Note that to make the code appears in multi-lines, it must be included between double quotation marks.
public function setTitle(string$title)Sets the title of the snippit. This can be used to specify the language the code represents (e.g. 'Java Code' or 'HTML Code'. The title will appear at the top of the snippit block.

Parameters:

  • string $title The title of the snippit.
mdi-menuAll Classesmdi-chevron-leftAnchorBrCodeSnippetHTMLDocHTMLListHTMLNodeHTMLTableHeadNodeInputJsCodeLabelListItemOrderedListParagraphRadioGroupTableCellTableRowUnorderedListInvalidNodeNameExceptionTemplateNotFoundExceptionCaseConverterJsonJsonConverterJsonIJsonTypesPropertyAPIFilterAbstractWebServiceManagerInfoServiceParamTypesRequestRequestParameterResponseUriWebServicesManagerAccessAutoLoaderConfigConfigControllerDBEAbstractWebServiceExtendedWebServicesManagerFileLoggerPrivilegePrivilegesGroupThemeThemeLoaderUploadFileUploaderUserUtilWebFioriAppLanguageErrorBoxHTTPCodeViewMessageBoxServerErrViewStarterPageWebPageDatabaseSessionStorageDefaultSessionStorageMSSQLSessionDataTableMSSQLSessionsTableMySQLSessionDataTableMySQLSessionsTableSessionSessionOperationsSessionStorageSessionsManagerRouterRouterUriAbstractMiddlewareMiddlewareManagerEmailMessageSMTPAccountSMTPServerClassLoaderExceptionFileExceptionInitializationExceptionInvalidCRONExprExceptionMissingLangExceptionNoSuchThemeExceptionRoutingExceptionSMTPExceptionSessionExceptionUIExceptionAbstractJobCronCronEmailCronJobJobArgumentCronLoginViewCronTasksViewCronViewCronLoginServiceCronLogoutServiceCronServicesManagerForceCronExecutionServiceGetJobsServiceCLICLICommandInputStreamOutputStreamStdInStdOutClassWriterLangClassWriterQueryClassWriterServiceHolderThemeClassWriterWebServiceWriterCreateCLIClassHelperCreateCronJobCreateMiddlewareCreateTableCreateTableObjCreateThemeHelperCreateWebServiceAddCommandCreateCommandCronCommandHelpCommandListCronCommandListRoutesCommandListThemesCommandRunSQLQueryCommandSettingsCommandTestRouteCommandUpdateSettingsCommandUpdateTableCommandVersionCommandAbstractQueryColumnColumnFactoryConditionConnectionConnectionInfoDatabaseDatabaseExceptionDateTimeValidatorEntityMapperExpressionForeignKeyJoinTableResultSetSelectExpressionTableWhereExpressionMySQLColumnMySQLConnectionMySQLQueryMySQLTableMSSQLColumnMSSQLConnectionMSSQLQueryMSSQLTableAbstractCollectionComparableLinkedListNodeQueueStack
Powered By: WebFiori Framework, Vue and VuetifyAll Rights Reserved © 2018 - 2024