Properties

$components

$components : array

The registered \Dewdrop\Admin\ComponentAbstract objects.

Type

array

$session

$session : \Dewdrop\Session

A Dewdrop Session object useful for get flash messenger messages, etc.

Type

\Dewdrop\Session

$coreClientSideDependencies

$coreClientSideDependencies : array

The core client-side dependencies we expect to be loaded in the admin.

These should all be sent through the bowerUrl() view helper so that their paths point to the bower_components folder for the current environment.

Type

array

$actionController

$actionController : \Zend_Controller_Action

Type

\Zend_Controller_Action

Methods

prependClientSideDependency()

prependClientSideDependency(string  $type, string  $name, string  $path) : $this

Prepend a client-side dependency you'd like to use throughout the admin environment.

Parameters

string $type

Either "css" or "js".

string $name

An identifier for the dependency.

string $path

The path (in your bower_components folder) to the dependency.

Returns

$this

appendClientSideDependency()

appendClientSideDependency(string  $type, string  $name, string  $path) : $this

Append a client-side dependency you'd like to use throughout the admin environment.

Parameters

string $type

Either "css" or "js".

string $name

An identifier for the dependency.

string $path

The path (in your bower_components folder) to the dependency.

Returns

$this

addClientSideDependencyAfterKey()

addClientSideDependencyAfterKey(string  $type, string  $name, string  $path, string  $key) : $this

Add a client-side dependency you'd like to use throughout the admin environment.

Parameters

string $type

Either "css" or "js".

string $name

An identifier for the dependency.

string $path

The path (in your bower_components folder) to the dependency.

string $key

The key of the value you want to put a dependency after.

Returns

$this

inflectComponentName()

inflectComponentName(string  $name) : string

Inflect a component name for use in URLs and routes.

Parameters

string $name

Returns

string

setSession()

setSession(\Dewdrop\Session  $session) : $this

Inject a Session object. If you don't provide one, we'll locate it with Pimple, but it's useful to inject during testing.

Parameters

\Dewdrop\Session $session

Returns

$this

setActiveComponent()

setActiveComponent(\Dewdrop\Admin\Component\ComponentInterface  $component) : $this

Set a reference to the active component.

Parameters

\Dewdrop\Admin\Component\ComponentInterface $component

Returns

$this

registerComponentsInPath()

registerComponentsInPath(string  $path = null) : \Dewdrop\Admin\Env\EnvAbstract

Look for and register all admin components in the given path. If no path is provided, the \Dewdrop\Paths->getAdmin() method will be used to find the default admin path for the application.

If no path is given, we'll use the getAdmin() method from \Dewdrop\Paths.

Parameters

string $path

Returns

\Dewdrop\Admin\Env\EnvAbstract

registerComponentFolder()

registerComponentFolder(string  $folder, string  $classPrefix = '\Admin\\') : \Dewdrop\Admin\Env\EnvAbstract

Register the single admin component located in the supplied path. This can be useful if you want to register individual components that are outside your normal folder for admin components. For example, if you've got some reuseable admin components in a library, or Dewdrop itself, you could register them with this method.

Parameters

string $folder
string $classPrefix

Returns

\Dewdrop\Admin\Env\EnvAbstract

assembleQueryString()

assembleQueryString(array  $params, string  $separator) : string

Assemble the remainder of a URL query string.

Parameters

array $params
string $separator

Returns

string

__construct()

__construct(\Zend_Controller_Action  $actionController) 

Parameters

\Zend_Controller_Action $actionController

renderLayout()

renderLayout(  $content, \Zend\View\Helper\HeadScript  $headScript = null, \Zend\View\Helper\HeadLink  $headLink = null) 

Parameters

$content
\Zend\View\Helper\HeadScript $headScript
\Zend\View\Helper\HeadLink $headLink

redirect()

redirect(  $url) 

Parameters

$url

validateClientSideDependencyType()

validateClientSideDependencyType(string  $type) 

Validate that a type is either "css" or "js".

Parameters

string $type

Either "css" or "js".