Populate select options with page names (also add no page option)
@param string $content
@return string
554012
public function edit($content)
    {
        $parent = BlockSelectOption::where('block_id', '=', $this->_block->id)->where('option', '=', 'parent')->first();
        $parentPageId = !empty($parent) ? $parent->value : 0;
        $this->_editViewData['selectOptions'] = [0 => '-- No Page Selected --'] + Page::get_page_list(['parent' => $parentPageId]);
        return parent::edit($content);
    }
961807
public function html($content = '')
    {
        $this->format = 'html';

        if (! str_empty($content)) {
            $this->content($content);
        }

        return $this;
    }
849742
public function html($content) {
        if (func_num_args() == 1) {
            $this->_data['fields'][] = $content;
            return $this;
        }
        $this->__attributes['fields'][$content] = func_get_arg(1);
        return $this;
    }
1184126
public function label($content)
    {
        // Handle long labels by splitting them across several lines
        $lines = [];
        $stop = mb_strlen($content);
        $width = $this->util->width();
        for ($i = 0; $i < $stop; $i += $width) {
            $lines[] = mb_substr($content, $i, $width);
        }
        $content = array_pop($lines);

        foreach ($lines as $line) {
            $this->output->write($this->parser->apply($line));
        }

        $content = $this->padContent($content);
        $content = $this->parser->apply($content);

        $this->output->sameLine();
        $this->output->write($content);

        return $this;
    }
67824
public function generateSearchText($content)
    {
        $content = @unserialize($content) ?: [];
        $searchText = $this->_generateSearchText(...$content);
        return parent::generateSearchText($searchText);
    }
610559
public function add(string $content, array $options = [])
    {
        $options = array_intersect_key($options, self::$columns_options_def) + self::$columns_options_def;
        $options['content'] = $content;

        $this->columns[] = $options;

        return $this;
    }
292917
protected function maybeRender($content)
    {
        if ($content instanceof ViewModel) {
            $content = $this->getView()->render($content);
        }

        return (string) $content;
    }
676760
public function edit($content)
    {
        $users = [];
        foreach (User::all() as $user) {
            $users[$user->id] = $user->getName() . ' (#'.$user->id.')';
        }
        $this->_editViewData['customName'] = array_key_exists($content, $users) ? '' : $content;
        $this->_editViewData['selectOptions'] = [0 => '-- Custom User --'] + $users;
        $content = $this->_editViewData['customName'] ? 0 : ($content ?: Auth::user()->id);
        return parent::edit($content);
    }
217071
public function cell($vars = '', $content = '')
    {
        $html = $this->wrapUp('cell');
        $tag = ($this->head) ? 'th' : 'td';
        $this->cell = '</'.$tag.'>';
        $vars = $this->values($vars);
        if (!empty($this->vars)) {
            $vars = array_merge($this->vars, $vars);
        }

        return $html.$this->page->tag($tag, $vars).$content;
    }
271020
public function parseNewPagesFrom($content) {
		$pages = array();
		if (preg_match_all('/\[\[([\w\s_.-]+)\]\]/', $content, $matches)) {
			// exit(print_r($matches));
			foreach ($matches[1] as $pageTitle) {
				$pages[] = $pageTitle;
			}
		}

		return $pages;
	}
4612
public function generateSearchText($content)
    {
        $searchText = '';
        $repeaterRows = PageBlockRepeaterData::loadRepeaterData($content, $this->_block->getVersionId());
        $repeaterBlocks = BlockRepeater::getRepeaterBlocks($this->_block->id);

        foreach ($repeaterRows as $rowId => $repeaterRow) {
            foreach ($repeaterBlocks as $blockId => $repeaterBlock) {
                if(($blockContent = array_key_exists($blockId, $repeaterRow) ? $repeaterRow[$blockId] : null) !== null) {
                    $block = Block::preloadClone($blockId)->setRepeaterData($this->_block->getRepeaterId(), $this->_block->getRepeaterRowId())->setPageId($this->_block->getPageId());
                    if ($block->exists && $block->search_weight > 0) {
                        $blockSearchText = $block->getTypeObject()->generateSearchText($blockContent);
                        $searchText .= ($blockSearchText !== null) ? $blockSearchText . "\n" : '';
                    }
                }
            }
        }

        return parent::generateSearchText($searchText);
    }
1315846
public static function modalFooter($content, $htmlOptions = array())
    {
        self::addCssClass('modal-footer', $htmlOptions);
        return self::tag('div', $htmlOptions, $content);
    }
1209195
public function prepend($content)
    {
        $content = self::create($content);
        $newnodes = array();
        foreach ($this as $i => $node) {
            $refnode = $node->firstChild;
            /** @var \DOMNode $node */
            foreach ($content as $newnode) {
                /** @var \DOMNode $newnode */
                $newnode = static::importNewnode($newnode, $node, $i);
                if ($refnode === null) {
                    $node->appendChild($newnode);
                } else if ($refnode !== $newnode) {
                    $node->insertBefore($newnode, $refnode);
                }
                $newnodes[] = $newnode;
            }
        }
        $content->clear();
        $content->add($newnodes);
        return $this;
    }
1294633
public static function get_content_value($content) {
        $arr = explode('##', $content->content);

        $strvalue = '';
        foreach ($arr as $a) {
            $strvalue .= $a . ' ';
        }

        return trim($strvalue, "\r\n ");
    }
1216537
public function value($options = [], $content = '')
    {
        if (!is_array($options)) {
            $options = ['value' => $options];
        }

        $this->values[] = new Option($this->form->expression('option'), $options, $content);
        return $this;
    }
665640
public function coreScriptFilter($content) {

        $attributes = [];

        $attributes["type"] = "text/javascript";

        $innerHTML = null !== $content ? implode("", ["\n", $content, "\n"]) : "";

        return static::coreHTMLElement("script", $innerHTML, $attributes);
    }
852504
public function add($content)
    {
        if (is_array($content)) $paths_list = $content;
        else $paths_list = array_map(explode(',', $content));
        $report = array();

        $options = func_get_args();
        array_shift($options);

        // parse options
        if (isset($options[0]) && is_string($options[0])) {
            $options[PCLZIP_OPT_ADD_PATH] = $options[0];
            if (isset($options[1]) && is_string($options[1])) {
                $options[PCLZIP_OPT_REMOVE_PATH] = $options[1];
            }
        } else {
            $options = array_combine(
                array_filter($options, function ($v) {return (bool) $v&2;}),
                array_filter($options, function ($v) {return (bool) ($v-1)&2;})
            );
        }

        // filters initiation
        $filters = array();
        if (isset($options[PCLZIP_OPT_REMOVE_PATH])
            && !isset($options[PCLZIP_OPT_REMOVE_ALL_PATH]))
            $filters[] = function (&$key, &$value) use ($options) {
                $key = str_replace($key, null, $key);
            };
        if (isset($options[PCLZIP_OPT_REMOVE_ALL_PATH]))
            $filters[] = function (&$key, &$value) { $key = basename($key); };
        if (isset($options[PCLZIP_OPT_ADD_PATH]))
            $filters[] = function (&$key, &$value) use ($options) {
                $key = rtrim($options[PCLZIP_OPT_ADD_PATH], '/').'/'.
                    ltrim($key, '/');
            };

        if (isset($options[PCLZIP_CB_PRE_ADD])
            && is_callable($options[PCLZIP_CB_PRE_ADD]))
            $preAddCallback = $options[PCLZIP_CB_PRE_ADD];
        else $preAddCallback = function () { return 1; };

        if (isset($options[PCLZIP_CB_POST_ADD])
            && is_callable($options[PCLZIP_CB_POST_ADD]))
            $postAddCallback = $options[PCLZIP_CB_POST_ADD];
        else $postAddCallback = function () { return 1; };

        if (isset($options[PCLZIP_OPT_COMMENT]))
            $this->archive->setArchiveComment($options[PCLZIP_OPT_COMMENT]);
        if (isset($options[PCLZIP_OPT_ADD_COMMENT])) {
            $comment =
                ($comment = $this->archive->getArchiveComment() !== false)
                    ? $comment : null;
            $this->archive->setArchiveComment(
                $comment . $options[PCLZIP_OPT_ADD_COMMENT]);
        }
        if (isset($options[PCLZIP_OPT_PREPEND_COMMENT])) {
            $comment =
                ($comment = $this->archive->getArchiveComment() !== false)
                    ? $comment : null;
            $this->archive->setArchiveComment(
                $options[PCLZIP_OPT_PREPEND_COMMENT] . $comment);
        }


        // scan filesystem for files list
        $files_list = array();
        foreach ($content as $file_to_add) {
            $report[] = $this->addSnippet($file_to_add, $filters,
                $preAddCallback, $postAddCallback);

            // additional dir contents
            if (is_dir($file_to_add)) {
                $directory_contents = new \RecursiveIteratorIterator(
                    new \RecursiveDirectoryIterator(
                        $file_to_add, \RecursiveDirectoryIterator::SKIP_DOTS),
                    RecursiveIteratorIterator::SELF_FIRST);
                foreach ($directory_contents as $file_to_add) {
                    $report[] = $this->addSnippet($file_to_add, $filters,
                        $preAddCallback, $postAddCallback);
                }
            }
        }
        // ...
        return $report;
    }