Skip to main content

GravityKit\GravityExport\Save\StorageType\Local

Storage type that stores to the local environment.

Since: 1.0

Source: add-ons/save/src/StorageType/Local.php:16

Details

  • Kind: class
  • Namespace: GravityKit\GravityExport\Save\StorageType
  • Extends: FlySystemStorageType

Methods

MethodDescription
__construct()Creates the storage type.
getId()Should return a unique name for the storage type.
getTitle()Should return the title of the storage type.
getIcon()Should return the icon for the storage method.
isDisabled()Should return whether the storage method is properly configured in the global settings.
getFeedFields()Should return the field section for this storage type.
getDefaultUploadDir()Returns the default upload directory.

Method Reference

__construct()

public function __construct( StorageService $service, string $path )

Creates the storage type.

Parameters

NameTypeDefaultDescription
$serviceStorageServiceThe storage service.
$pathstring

Since: 1.0

Source: add-ons/save/src/StorageType/Local.php:36

getId()

public function getId(): string

Should return a unique name for the storage type.

Returns

  • string

Since: 1.0

Source: add-ons/save/src/StorageType/Local.php:45

getTitle()

public function getTitle(): string

Should return the title of the storage type.

Returns

  • string

Since: 1.0

Source: add-ons/save/src/StorageType/Local.php:53

getIcon()

public function getIcon(): string

Should return the icon for the storage method.

In GF 2.4, it must be a FontAwesome CSS class. In GF 2.5, it must be parseable by \GFCommon::get_icon_markup().

Returns

  • string

Since: 1.0

Source: add-ons/save/src/StorageType/Local.php:61

isDisabled()

public function isDisabled(): bool

Should return whether the storage method is properly configured in the global settings.

Returns

  • bool

Source: add-ons/save/src/StorageType/Local.php:69

getFeedFields()

public function getFeedFields( SaveAddon $feed ): array

Should return the field section for this storage type.

Parameters

NameTypeDefaultDescription
$feedSaveAddonThe storage feed addon.

Returns

  • mixed[] — The fields for the storage type.

Since: 1.0

Source: add-ons/save/src/StorageType/Local.php:77

getDefaultUploadDir()

public static function getDefaultUploadDir()

Returns the default upload directory.

Returns

  • false | string

Source: add-ons/save/src/StorageType/Local.php:125