Skip to content
AlexFloppy edited this page Jan 27, 2015 · 3 revisions

Description

Used for work with global options. Available management using dashboard crud.

Entity

  • namespace - unique namespace
  • key - option name
  • value - option value
  • description - option description
  • created - created timestamp
  • updated - last updated timestamp

Usage

/** @var \Options\Service\Options $optionService */
$optionService = $this->getServiceLocator()->get('Options\Service\Options');

// save option 'key' with value 'value' in the 'default' namespace
$optionService->setOption('key', 'value', 'default');

// get option 'key' from 'default' namespace
$optionService->getOption('key', 'default');

// get options array from default namespace
$optionService->getNamespace('default');

Clone this wiki locally