Function Hook_fields_theme_image->get_field_value_row_bits

Definitions

sources/hooks/systems/fields/theme_image.php

  • Get some info bits relating to our field type, that helps us look it up / set defaults.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$field ?array No No required parameter N/A N/A The field details (null: new field)
$required ?boolean No No Null N/A N/A Whether a default value cannot be blank (null: don't "lock in" a new default value) (may be passed as false also if we want to avoid "lock in" of a new default value, but in this case possible cleanup of $default may still happen where appropriate)
$default ?string No No Null N/A N/A The given default value as a string (null: don't "lock in" a new default value) (blank: only "lock in" a new default value if $required is true)

Returns

  • Tuple of details (row-type,default-value-to-use,db row-type)
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get some info bits relating to our field type, that helps us look it up / set defaults.
 *
 * @param  ?array $field The field details (null: new field)
 * @param  ?boolean $required Whether a default value cannot be blank (null: don't "lock in" a new default value) (may be passed as false also if we want to avoid "lock in" of a new default value, but in this case possible cleanup of $default may still happen where appropriate)
 * @param  ?string $default The given default value as a string (null: don't "lock in" a new default value) (blank: only "lock in" a new default value if $required is true)
 * @return array Tuple of details (row-type,default-value-to-use,db row-type)
 */

public function get_field_value_row_bits(?array $field, ?bool $required = null, ?string $default = null) : array