public static function fromArray(array $configuration)
    {
        $type = ArrayHelper::getValue($configuration, 'type');
        $value = ArrayHelper::getValue($configuration, 'value');
        $target = ArrayHelper::getValue($configuration, 'target');
        
        if (empty($type)) {
            return false;
        }
        
        return (new self(['type' => $type, 'value' => $value, 'target' => $target]));
    }
public static function fromArray(array $configuration)
    {
        $type = ArrayHelper::getValue($configuration, 'type');
        $value = ArrayHelper::getValue($configuration, 'value');
        $target = ArrayHelper::getValue($configuration, 'target');
        
        if (empty($type)) {
            return false;
        }
        
        return (new self(['type' => $type, 'value' => $value, 'target' => $target]));
    }
public static function fromArray ( array $ configuration ) { $ type = ArrayHelper :: getValue ( $ configuration , 'type' ) ; $ value = ArrayHelper :: getValue ( $ configuration , 'value' ) ; $ target = ArrayHelper :: getValue ( $ configuration , 'target' ) ; if ( empty ( $ type ) ) { return false ; } return ( new self ( [ 'type' => $ type , 'value' => $ value , 'target' => $ target ] ) ) ; }
Generate a link converter object from an array.

If type is empty, false is returned. This allows us to have predefined values from
value and target and do not throw an exception.

@param array $configuration
@return \luya\cms\LinkConverter|false
Generate a link converter object from an array .