. */ /** * Template partials tags. * * @since 4.6.0 */ namespace Textpattern\Tag\Syntax; class Partial { /** * Returns the inner content of the enclosing <txp:output_form /> tag. * * @return string */ public static function renderYield() { global $yield; $inner = end($yield); return isset($inner) ? $inner : ''; } /** * Conditional for yield. * * @param array $atts * @param string $thing * @return string */ public static function renderIfYield($atts, $thing) { global $yield; extract(lAtts(array( 'value' => null, ), $atts)); $inner = end($yield); return parse(EvalElse($thing, $inner !== null && ($value === null || (string)$inner === (string)$value))); } }