PHPFusion\QuantumFields::parse_label PHP Méthode

parse_label() public static méthode

Parse the correct label language. Requires serialized $value.
public static parse_label ( $value ) : string
$value - Serialized
Résultat string NOTE: If your field does not parse properly, check your column length. Set it to TEXT NOT NULL.
    public static function parse_label($value)
    {
        if (self::is_serialized($value)) {
            $value = @unserialize($value);
            // if anyone can give me a @unserialize($value) withotu E_NOTICE. I'll drop is_serialized function.
            return (string) isset($value[LANGUAGE]) ? $value[LANGUAGE] : '';
        } else {
            return (string) $value;
        }
    }

Usage Example

 function breadcrumb_page_arrays($tree_index, $tree_full, $id_col, $title_col, $getname, $id)
 {
     $crumb =& $crumb;
     if (isset($tree_index[get_parent($tree_index, $id)])) {
         $_name = get_parent_array($tree_full, $id);
         $crumb = array('link' => isset($_name[$id_col]) ? clean_request($getname . "=" . $_name[$id_col], array("aid"), TRUE) : "", 'title' => isset($_name[$title_col]) ? \PHPFusion\QuantumFields::parse_label($_name[$title_col]) : "");
         if (get_parent($tree_index, $id) == 0) {
             return $crumb;
         }
         $crumb_1 = breadcrumb_page_arrays($tree_index, $tree_full, $id_col, $title_col, $getname, get_parent($tree_index, $id));
         if (!empty($crumb_1)) {
             $crumb = array_merge_recursive($crumb, $crumb_1);
         }
     }
     return $crumb;
 }
All Usage Examples Of PHPFusion\QuantumFields::parse_label