Always call this before outputting any content inside the wrapper tag.
769598
protected function beginContent ()
  {
    if (isset($this->tag) && !$this->tag->isContentSet) {
      echo '>';
      $this->tag->isContentSet = true;
    }
  }
217103
private void prepareNext()
    {
        hasNext = false;
        while (delegate.hasNext())
        {
            next = delegate.next();
            if (predicate.test(next))
            {
                hasNext = true;
                break;
            }
        }
    }
289377
function() {
        var input = this.element,
            wrapper = this.render(this.options.template)
                .insertBefore(input)
                .append(input);

        if (this.options.copyClasses) {
            this.copyClasses(input, wrapper);
        }

        return wrapper;
    }
1285086
public function onBeforeWrite()
    {
        parent::onBeforeWrite();

        if (empty($this->Secret)) {
            $this->Secret = $this->generateSecret();
        }

        if (empty($this->Identifier)) {
            $this->Identifier = $this->generateSecret();
        }
    }
1275890
def always_executed_hook(self):
        """"""
        _logT = self._devProxy.get_logging_target()
        if 'device::sip_sdp_logger' not in _logT:
            try:
                self._devProxy.add_logging_target('device::sip_sdp/elt/logger')
                self.info_stream("Test of Tango logging from "
                                 "'tc_tango_master'")

            except Exception as e:
                LOG.debug('Failed to setup Tango logging %s', e )
394838
def pre_run(self, outline=False, dump=False, *args, **kwargs):
        """"""
        if should_ensure_cfn_bucket(outline, dump):
            self.ensure_cfn_bucket()
        hooks = self.context.config.pre_build
        handle_hooks(
            "pre_build",
            hooks,
            self.provider,
            self.context,
            dump,
            outline
        )
375770
def beforeRender(self, ctx):
        
        request = IRequest(ctx)
        root = self.webSite.rootURL(request)
        self._moduleRoot = root.child('__jsmodule__')
962153
@Override
    public void processOtherContent(Wrapper<Content> content) {
        if (processFirstOtherContent) {
            builder.append(baseIndent).append("otherContentList=").append("\n");
            processFirstOtherContent = false;
        }
        builder.append(content.toString(baseIndent)).append("\n");
    }
768771
public function onBeforeWrite()
    {
        $owner = $this->owner;
        $owner->IDCustomValue = Convert::raw2url($owner->IDCustomValue);
    }
466430
public function onBeforeWrite()
    {
        parent::onBeforeWrite();
        if (empty($this->Title)) {
            $type = $this->Type;
            switch ($type) {
                case 'URL':
                case 'Email':
                case 'Phone':
                    $this->Title = $this->getField($type);
                    break;
                case 'SiteTree':
                    $this->Title = $this->SiteTree()->MenuTitle;
                    break;
                default:
                    if ($this->getRelationType($type) == 'has_one' && $component = $this->getComponent($type)) {
                        $this->Title = $component->Title;
                    } else {
                        $this->Title = 'Link-' . $this->ID;
                    }
                    break;
            }
        }
    }
569141
public function onBeforeWrite()
    {
        $maps = array(
            /** URL Mapping */
            'TagAction',
            'TagsAction',
            'ShowAction',
            'AuthorAction',
            'ArchiveAction',
        );
        foreach ($maps as $map) {
            if ($this->owner->$map) {
                $this->owner->$map = singleton('SiteTree')->generateURLSegment($this->owner->$map);
            }
        }
        $newsFolder = Folder::find_or_make(Config::inst()->get($this->class, 'uploads_folder'));
        $this->owner->NewsRootFolderID = $newsFolder->ID;
    }
636272
def handle_starttag(self, tag, attrs):
        """"""
        if (tag in self.newline_before_elements):
            self.text += '\n'
        if (tag in self.stroke_before_elements and not
                self.text.endswith(self.stroke_text)):
            # Put a stroke in front of every relevant element, if there is some
            # content between it and its predecessor
            self.text += self.stroke_text
        if tag == 'a':
            # If it's a link, append it to the link list
            for attr in attrs:
                if attr[0] == 'href':
                    self.links.append((len(self.links) + 1, attr[1]))
1344487
protected function BeforeInit()
    {
        //todo: check access rights
        $cacheFile = PathUtil::ContentCacheFile($this);
        $this->fileCacher = new FileCacher($cacheFile, $this->content->GetCacheLifetime());
        if ($this->fileCacher->MustUseCache())
        {
            $this->output = $this->fileCacher->GetFromCache();
            return true;
        }
        return parent::BeforeInit();
    }
491215
function wrap (factory, node, tag) {
    // If there is a previous node that is not text, insert a new line to
    // for 
    if (node.previousSibling != null && node.previousSibling.nodeType != 3) {
        var newline = factory.createTextNode("\n");
        body.insertBefore(newline, node);
    }
    var wrapper = factory.createElement(tag);
    node.parentNode.insertBefore(wrapper, node);
    wrapper.appendChild(node);
    return wrapper;
  }
14206
public function onBeforeWrite()
    {
        parent::onBeforeWrite();

        if (!$this->supportsElemental()) {
            return;
        }

        $elementalAreaRelations = $this->owner->getElementalRelations();

        $this->ensureElementalAreasExist($elementalAreaRelations);

        if (Config::inst()->get(self::class, 'clear_contentfield')) {
            $this->owner->Content = '';
        }
    }
207013
def wrap(self, other):
        """"""
        if other.childs:
            raise TagError(self, "Wrapping in a non empty Tag is forbidden.")
        if self.parent:
            self.before(other)
            self.parent.pop(self._own_index)
        other.append(self)
        return self
1294688
@SuppressWarnings("fallthrough")
    protected void blockContent() {

        loop:
        while (bp < buflen) {
            switch (ch) {
                case '\n': case '\r': case '\f':
                    newline = true;
                    // fallthrough

                case ' ': case '\t':
                    nextChar();
                    break;

                case '&':
                    entity(null);
                    break;

                case '<':
                    html();
                    break;

                case '>':
                    newline = false;
                    nextChar();
                    break;

                case '{':
                    inlineTag(null);
                    break;

                case '@':
                    if (newline) {
                        break loop;
                    }
                    // fallthrough

                default:
                    newline = false;
                    nextChar();
            }
        }
    }