Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Type

Description

screen.home

object

Define Home screen of the app

screen.home.headerTitle

string

 

screen.home.header_buttons

object

List of button display on the Home Screen

screen.home.header_menu

object

 

screen.home.header_menu.config_name

 

 

screen.home.header_menu.action

 

 

screen.home.default

 

 

screen.home.default.parent

 

 

screen.home.default.category_layout

 

 

screen.app.header_menu

 

 

...

Page Name

Screen ID

Module Home Page

module

Module Detail Page

detail

Module Search Page

listing

...

Naming Convention of Screen Name on Mobile app

Each module (such as Blog, Event, etc) will have 3 default screens: Module Home Screen, Module Detail Screen, Module Listing Screen

Screen Name

Naming Convention

Module Home Screen

"module" + app name

Ex: moduleBlog

Module Detail Screen

"detail" + app name

Ex: detailBlog

Module Listing Screen

"listing" + app name

Ex: listingBlog

Here is the sample API response for Blog

Each screen has some sections to show content, support some locations:

...

To implement Views component for screen setting, make sure your App was added API service implementing MobileAppSettingInterface. Then add the new function 
getScreenSetting in that API.
Example:

 

Code Block
use Apps\Core_MobileApi\Adapter\MobileApp\ScreenSetting;
use Apps\Core_MobileApi\Adapter\MobileApp\MobileAppSettingInterface;
//.....

class BlogApi extends AbstractResourceApi implements ActivityFeedInterface, MobileAppSettingInterface
{
//.....
	public function getScreenSetting($param)
	{
		$screenSetting = new ScreenSetting('blog',[
			'name' => 'blogs'
		]);
		$resourceName = BlogResource::populate([])->getResourceName();
		$screenSetting->addSetting($resourceName, ScreenSetting::MODULE_HOME);
		$screenSetting->addSetting($resourceName, ScreenSetting::MODULE_LISTING);
		$screenSetting->addSetting($resourceName, ScreenSetting::MODULE_DETAIL);
		$screenSetting->addBlock($resourceName, ScreenSetting::MODULE_HOME, ScreenSetting::LOCATION_RIGHT, [
			'component' => ScreenSetting::SIMPLE_LISTING_BLOCK,
			'title' => 'most_viewed',
			'resource_name' => $resourceName,
			'module_name' => 'blog',
			'query' => ['sort' => 'most_viewed']
		]);
		return $screenSetting;
	}
}

...