/** * Condition is empty. * * @param string $value value * @param array $params params * * - then: returns when value is empty. * * @param Template $template * @return string */ public static function _empty($value = null, array $params, Template $template) { if (!empty($value)) { return $value; } //$template = clone $template; $placeholders = array_merge(!empty($params['addPlaceholders']) ? $template->findPlaceholders($params['addPlaceholders']) : [], ['output' => $value]); return $template->replaceByPrefix($params['then'], $placeholders); }