protected function columnPatch($col, array $params)
    {
        extract($params);

        /** @var int $height */
        if ($height > 0) $height = '+'.$height;

        if (isset($cut)) {
            return new Expression("case when {$col} >= {$cut} then {$col}{$height} else {$col} end");
        }

        /** @var int $distance */
        /** @var int $lft */
        /** @var int $rgt */
        /** @var int $from */
        /** @var int $to */
        if ($distance > 0) $distance = '+'.$distance;

        return new Expression("case ".
            "when {$col} between {$lft} and {$rgt} then {$col}{$distance} ". // Move the node
            "when {$col} between {$from} and {$to} then {$col}{$height} ". // Move other nodes
            "else {$col} end"
        );
    }
protected function columnPatch($col, array $params)
    {
        extract($params);

        /** @var int $height */
        if ($height > 0) $height = '+'.$height;

        if (isset($cut)) {
            return new Expression("case when {$col} >= {$cut} then {$col}{$height} else {$col} end");
        }

        /** @var int $distance */
        /** @var int $lft */
        /** @var int $rgt */
        /** @var int $from */
        /** @var int $to */
        if ($distance > 0) $distance = '+'.$distance;

        return new Expression("case ".
            "when {$col} between {$lft} and {$rgt} then {$col}{$distance} ". // Move the node
            "when {$col} between {$from} and {$to} then {$col}{$height} ". // Move other nodes
            "else {$col} end"
        );
    }
protected function columnPatch ( $ col , array $ params ) { extract ( $ params ) ; /** @var int $height */ if ( $ height > 0 ) $ height = '+' . $ height ; if ( isset ( $ cut ) ) { return new Expression ( "case when {$col} >= {$cut} then {$col}{$height} else {$col} end" ) ; } /** @var int $distance */ /** @var int $lft */ /** @var int $rgt */ /** @var int $from */ /** @var int $to */ if ( $ distance > 0 ) $ distance = '+' . $ distance ; return new Expression ( "case " . "when {$col} between {$lft} and {$rgt} then {$col}{$distance} " . // Move the node "when {$col} between {$from} and {$to} then {$col}{$height} " . // Move other nodes "else {$col} end" ) ; }
Get patch for single column.

@since 2.0

@param string $col
@param array $params

@return string
Get patch for single column .