class View

Supports ability to create views, layouts, components, and menu_acl json files.

Constants

COMPONENTS_PATH

Path to components.

CSS_PATH

Path to CSS files.

LAYOUT_PATH

Path to layout files.

VIEW_PATH

Path to view files.

WIDGET_PATH

Path to widget files.

Methods

static string
cardComponent()

Returns contents of a card component.

static string
formComponent(string $method, string $encType)

Generates content of form component.

static string
layout(string $menuName)

Generates a layout compatible with React.js

static int
makeCardComponent(string $componentName)

Writes card component to a file.

static int
makeCSS(string $fileName)

Generates a new CSS file.

static int
makeFormComponent(string $componentName, string $method, string $encType)

Writes form component to file.

static int
makeLayout(string $layoutName, string $menuName = 'main')

Generates a new layout file.

static int
makeMenu(string $menuName)

Generates a new menu file.

static int
makeMenuAcl(string $menuName)

Generates a new menu_acl file.

static int
makeTableComponent(string $componentName)

Writes table component to a file.

static int
makeView(string $filePath)

Writes template for view to a file.

static int
makeWidget(string $filePath)

Writes new file for widget.

static string
menu(string $menuName)

Returns a string containing contents for a menu.

static string
menuAcl(string $menuName)

Returns a string containing contents of a json menu acl file.

static string
tableComponent()

Generates content for table component.

static string
viewContent()

Generates content for view file.

Details

at line 27
static string cardComponent()

Returns contents of a card component.

Return Value

string

The contents of a card component.

at line 43
static string formComponent(string $method, string $encType)

Generates content of form component.

Parameters

string $method

The method to be used.

string $encType

The enctype to be used.

Return Value

string

The contents of the form component.

at line 60
static string layout(string $menuName)

Generates a layout compatible with React.js

Parameters

string $menuName

The name of the menu for the layout

Return Value

string

The contents of the layout.

at line 117
static int makeCardComponent(string $componentName)

Writes card component to a file.

Parameters

string $componentName

The name of the card component.

Return Value

int

A value that indicates success, invalid, or failure.

at line 131
static int makeCSS(string $fileName)

Generates a new CSS file.

Parameters

string $fileName

The name of the CSS file.

Return Value

int

A value that indicates success, invalid, or failure.

at line 147
static int makeFormComponent(string $componentName, string $method, string $encType)

Writes form component to file.

Parameters

string $componentName

The name of the form component.

string $method

The method to be used.

string $encType

The enctype to be used.

Return Value

int

A value that indicates success, invalid, or failure.

at line 162
static int makeLayout(string $layoutName, string $menuName = 'main')

Generates a new layout file.

Parameters

string $layoutName

The name of the layout.

string $menuName

The name of the menu to be used.

Return Value

int

A value that indicates success, invalid, or failure.

at line 177
static int makeMenu(string $menuName)

Generates a new menu file.

Parameters

string $menuName

Return Value

int

A value that indicates success, invalid, or failure.

at line 191
static int makeMenuAcl(string $menuName)

Generates a new menu_acl file.

Parameters

string $menuName

The name of the menu_acl file.

Return Value

int

A value that indicates success, invalid, or failure.

at line 205
static int makeTableComponent(string $componentName)

Writes table component to a file.

Parameters

string $componentName

The name of the table component.

Return Value

int

A value that indicates success, invalid, or failure.

at line 219
static int makeView(string $filePath)

Writes template for view to a file.

Parameters

string $filePath

Return Value

int

A value that indicates success, invalid, or failure.

at line 229
static int makeWidget(string $filePath)

Writes new file for widget.

Parameters

string $filePath

The path to the widget file.

Return Value

int

A value that indicates success, invalid, or failure.

at line 239
static string menu(string $menuName)

Returns a string containing contents for a menu.

Parameters

string $menuName

The name for a new menu.

Return Value

string

The contents for a new menu.

at line 286
static string menuAcl(string $menuName)

Returns a string containing contents of a json menu acl file.

Parameters

string $menuName

The name of the acl file that matches your menu name

Return Value

string

The contents of the json menu acl file.

at line 300
static string tableComponent()

Generates content for table component.

Return Value

string

The content of the table component.

at line 318
static string viewContent()

Generates content for view file.

Return Value

string

The content for the view file.