Méthode | Description | |
---|---|---|
field_load ( string $key ) : mixed | Loads form values from an object | |
field_save ( string $key, mixed $value ) | Stores a form value into the object | |
has ( $tags ) : boolean. | See if a term or set of terms is in this set of terms | |
parse ( mixed $terms, string $term_class = '\Habari\Term', |
Turns a comma-separated string or array of terms into an array of Term objects | |
tree_sort ( $sort_fn = null ) : |
Sort the term objects by mptt_left ASC to put them in tree order |
public field_load ( string $key ) : mixed | ||
$key | string | The name of a form component that will be loaded |
Résultat | mixed | The stored value returned |
public field_save ( string $key, mixed $value ) | ||
$key | string | The name of a form component that will be stored |
$value | mixed | The value of the form component to store |
public has ( $tags ) : boolean. | ||
Résultat | boolean. |
public static parse ( mixed $terms, string $term_class = '\Habari\Term', |
||
$terms | mixed | A comma-separated string or array of string terms |
$term_class | string | The class of the Term object type to create from each string |
$vocabulary | An instance of the Vocabulary that might hold the terms. Use existing term object data if found in the specified vocabulary. | |
Résultat | An instance of Terms contianing the specified Term objects |
public tree_sort ( $sort_fn = null ) : |
||
Résultat | A sorted Terms instance |