// From 'charcoal-contrib-filepond'
use Charcoal\FilePond\Service\Helper\FilePondAwareTrait;
/**
* Create a new instructor.
*/
class SomeAction extends AbstractAction
{
use FilePondAwareTrait;
/**
* Inject dependencies from a DI Container.
*
* @param Container $container A Pimple DI service container.
* @return void
*/
public function setDependencies(Container $container)
{
parent::setDependencies($container);
$this->setFilePondService($container['file-pond/service']('private'));
}
}
/**
* Attempts to handle the transfer of uploads given the proper parameters.
* If possible, it will try to :
* - fetch the upload path from the property.
* - fetch the filesystem based on the public access of the property.
* - Pass it through the best processor depending on wether their were ids passed or not.
*
* @param string|array|null $ids The uploaded files ids. Let to null to force $_FILES and $_POST.
* @param string|PropertyInterface|null $property The property ident or a property.
* @param ModelInterface|string|null $context The context object as model or class ident.
* @param string|null $pathSuffix Path suffix.
* @return array
*/
protected function handleTransfer(
$ids = null,
$property = null,
$context = null,
$pathSuffix = null
)