public function SessionHelper::setPath in Examples for Developers 3.x
Same name and namespace in other branches
- 8 stream_wrapper_example/src/SessionHelper.php \Drupal\stream_wrapper_example\SessionHelper::setPath()
Set a path.
Parameters
string $path: Path into the store.
string|array $value: Set a value.
File
- modules/
stream_wrapper_example/ src/ SessionHelper.php, line 200
Class
- SessionHelper
- Helper to manage file wrapper data stored in the session object.
Namespace
Drupal\stream_wrapper_exampleCode
public function setPath($path, $value) {
$path_info = $this
->getParentPath($path);
$store_info = $this
->processPath($path_info['dirname']);
if ($store_info !== FALSE) {
$store_info['tip'][$path_info['basename']] = $value;
}
$this
->setStore($store_info['store']);
}