Function Resource_fs_base->resource_edit

Definitions

sources/resource_fs_base_class.php

  • Edits the resource to the given properties. Wraps file_edit/folder_edit.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$resource_type ID_TEXT No No required parameter N/A N/A Resource type
$filename ID_TEXT No No required parameter N/A N/A The filename
$path string No No required parameter N/A N/A The path (blank: root / not applicable)
$properties array No No required parameter N/A N/A Properties (may be empty, properties given are open to interpretation by the hook but generally correspond to database fields)
$explicit_move boolean No No False N/A N/A Whether we are definitely moving (as opposed to possible having it in multiple positions)

Returns

  • The resource ID (false: error, could not create via these properties / here)
  • Type: ~ID_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Edits the resource to the given properties. Wraps file_edit/folder_edit.
 *
 * @param  ID_TEXT $resource_type Resource type
 * @param  ID_TEXT $filename The filename
 * @param  string $path The path (blank: root / not applicable)
 * @param  array $properties Properties (may be empty, properties given are open to interpretation by the hook but generally correspond to database fields)
 * @param  boolean $explicit_move Whether we are definitely moving (as opposed to possible having it in multiple positions)
 * @return ~ID_TEXT The resource ID (false: error, could not create via these properties / here)
 */

public function resource_edit(string $resource_type, string $filename, string $path, array $properties, bool $explicit_move = false)