Helpers

Hush provides several helpers to simplify your life.
Constructor and Input helper may be used in views without specifying their namespace.

ScaryLayer\Hush\Helpers\Constructor

Provides many methods, which is used to build different hush things.
But you will be interested in one method:

  • link which hush uses to build links, it requires two params:

    • link-config which is described on Linking system page
    • variables - array of variables and their values, which should be available for this link constructor.

ScaryLayer\Hush\Helpers\Input

Contains single static method - render, which is used, when hush builds an input.
It requires two params:

  • input - config for input rendering.
  • variables - array of variables and their values, which should be available for this input.

ScaryLayer\Hush\Helpers\Image

Contains single static method - store, which will store image where you want in public directory.
It takes two arguments:

  • file which should be stored.
  • savePath where it should be stored.