Append the text with a string of html on render if a certain condition is
met.

@param bool $condition
@param string $append

@return static
964583
public function appendIf($condition, string $append)
    {
        if ($this->resolveCondition($condition)) {
            return $this->append($append);
        }

        return $this;
    }
727544
public function append($str)
    {
        $value = $this->val();
        $this->val($value . $str);

        return $this;
    }
967332
public function appendContent($content)
    {
        if(!is_string($content) && !($content instanceof self))
        {
            throw new HTMLTagException("Only HTMLTags and strings are allowed as content.");
        }

        $this->tag_content[] = $content;

        $this->setClosingTag(true);

        return $this;
    }
394722
public function actionIf($condition, $action, string $text, array $parameters = [], bool $absolute = true)
    {
        return $this->addIf($condition, Link::toAction($action, $text, $parameters, $absolute));
    }
16016
function append(element, content) {
  if (isString(content)) {
    return element.insertAdjacentHTML('beforeEnd', content);
  } else {
    return element.appendChild(normalizeContent(content));
  }
}
935452
public function addCondition(ConditionAbstract $condition)
    {
        if ($condition instanceof SupportsCondition) {
            $this->conditions[] = $condition;
        } else {
            throw new \InvalidArgumentException(
                "Invalid condition instance. Instance of 'SupportsCondition' expected."
            );
        }

        return $this;
    }
349342
public function render(Append $append)
    {
        if ($append->isAuthorized()) {
            return $this->factory->make($this->view, [
                'append' => $append
            ])->render();
        }
    }
590525
public function addCondition( $condition )
	{
		if( is_array( $condition ) )
			return $this->addConditions( $condition );
		if( in_array( $condition, $this->conditions ) )
			return FALSE;
		$this->conditions[] = $condition;
		return TRUE;
	}
1072890
public function append($elements, $extra = null)
    {
        $conditions = (array)$elements;

        if (!$this->_where) {
            $this->_where = new Where();
        }

        foreach ($conditions as $condition) {
            $logicInner = 'AND';
            $value      = null;

            if (is_array($condition)) {
                $value      = isset($condition[1]) ? $condition[1] : null;
                $logicInner = isset($condition[2]) ? $condition[2] : 'AND';
                $condition  = $condition[0];
            }

            $this->_where->append(array($condition, $value), $logicInner);
        }
    }
783991
public function append($tag, $value, $encode = true)
    {
        if ($value instanceof URL) {
            $value = $value->__toString();
        }
        // Temporary here until we finish testing
        if ($encode
            && $value != $this->app->encodeHtmlChars($value, ENT_NOQUOTES)
            && $this->app->getConfig('html_injection_debug', false)
        ) {
            throw $this->exception('Attempted to supply html string through append()')
                ->addMoreInfo('val', var_export($value, true))
                ->addMoreInfo('enc', var_export($this->app->encodeHtmlChars($value, ENT_NOQUOTES), true))
                //->addAction('ignore','Ignore tag'.$tag)
                ;
        }
        if ($encode) {
            $value = $this->app->encodeHtmlChars($value, ENT_NOQUOTES);
        }
        if ($this->isTopTag($tag)) {
            $this->template[] = $value;

            return $this;
        }
        if (!isset($this->tags[$tag]) || !is_array($this->tags[$tag])) {
            throw $this->exception("Cannot append to tag $tag")
                ->addMoreInfo('by', $this->owner);
        }
        foreach ($this->tags[$tag] as $key => $_) {
            if (!is_array($this->tags[$tag][$key])) {
                //throw new BaseException("Problem appending '".
                //      $this->app->encodeHtmlChars($value)."' to '$tag': key=$key");
                $this->tags[$tag][$key] = array($this->tags[$tag][$key]);
            }
            $this->tags[$tag][$key][] = $value;
        }

        return $this;
    }
181568
public function write($string, $append = true)
    {
        $mode = $this->getMode($append);
        $this->setHandle($mode);

        return fwrite($this->handle, $string);
    }
1256909
public function append($content, $create = false)
    {

        if ($this->writeable !== true || empty($content)) return false;

        if (strpos($this->_option, 'a') === false) {
            // close open filepoint
            if (!empty($this->fp)) fclose($this->fp);
            // opens fp for writing with file lock
            $this->open_fp((is_bool($create) && $create === true ? 'a+' : 'a'));
        }

        if ($this->file_lock !== true && !$this->lock(LOCK_EX)) return false;

        // writes to file
        fputs($this->fp, $content, strlen($content));
        // releases lock
        $this->lock(LOCK_UN);

        return true;
    }
145499
public function appendScript($content, $onTop = false)
    {
        static $counter = 0;
        
        $this->scripts[$onTop == 'high' ? $counter : $counter + 1000] = $content;
        $counter++;
        return $this;
    }
99704
public function addContents($contents, bool $prepend = false, $target = self::TARGET_BODY_START) {
		ArgUtils::valEnum($target, array(self::TARGET_BODY_START, self::TARGET_BODY_END, self::TARGET_HEAD));
		
		if ($target == self::TARGET_HEAD) {
			$target = self::HEAD_CONTENTS_KEY;
		}
		
		$this->htmlProperties->push($target, new Raw($this->view->getHtmlBuilder()->getOut($contents)), $prepend);
		
		return $this;
	}
427848
public function appendContent($content, $code = 200)
    {
        if (!empty($content)) {
            $oldContent = $this->getContent();

            if (!empty($oldContent)) {
                if (!is_scalar($content)) {
                    $content = json_encode($content);
                }

                $this->toHTML();
                $content = $oldContent . $content;
            }

            $this->setContent($content, $code);
        }
        return $this;
    }
806642
public function where($condition, $value = null, $append = false, $clause = "WHERE")
    {
        if (is_array($value)) {
            $condition = $this->formatWhereConditionWithMultipleTokens($condition, $value, $this->escapeValidator);
        } else {
            if ($value === null) {
                $condition = preg_replace("/=\s*\?/", "IS ?", $condition, 1);
                $value = 'NULL';
            } else if (is_bool($value)) {
                $value = $value ? 'TRUE' : 'FALSE';
            } else if (is_int($value) || is_float($value)) {
                // Preserve $value as is
            } else {
                $rid = $this->ridValidator->check($value, true);
                $value = $rid ? $rid : '"' . $this->escapeValidator->check($value, true) . '"';
            }

            $condition = str_replace("?", $value, $condition);
        }

        if (!$this->getTokenValue('Where')) {
            $clause = 'WHERE';
        }

        $this->setTokenValues('Where', array("{$clause} $condition"), $append, false, false);

        return $this;
    }
702091
public function setText(string $text=null, bool $append=true) :self {
		// append by default or replace text
		$this->content = $append ? $this->content . Format::htmlSafe($text) : Format::htmlSafe($text);
		// return self
		return($this);
	}