ContentService::getWriterFor
Gets a writer for a DataObject
If the field already has a value, a writer is created matching that identifier. Otherwise, a new writer is created based on either - The $type passed in - whether the $object class specifies a prefered storage type via getEffectiveContentStore - what the `defaultStore` is set to for the content service
Signature
public function getWriterFor([DataObject
$object = NULL,
[string
$field = 'FilePointer',
[String
$type = NULL]]] )
Parameters
$object
— DataObject
The object to get a writer for$field
— string
The field being written to$type
— object
Explicitly state what the content store type will be
Returns
- ContentWriter