Renders the object as a list item for the HTML template.

@param boolean $isFirst Item is first in the list.
@param boolean $isMiddle Item is in the middle of the list.
@param boolean $isLast Item is last in the list.

@return DBHTMLText
346612
public function renderListItem($isFirst = false, $isMiddle = false, $isLast = false, $wtf = false)
    {
        return $this->owner->customise([
            'isFirst' => $isFirst,
            'isMiddle' => $isMiddle,
            'isLast' => $isLast
        ])->renderWith($this->owner->getListItemTemplate());
    }
790775
@Action(
            restrictTo = RestrictTo.PROTOTYPING
    )
    @MemberOrder(sequence="20")
    public Object installFixturesAndReturnFirst() {
        final List<FixtureResult> run = findFixtureScriptFor(ExampleTaggableEntitiesSetUpFixture.class).run(null);
        return run.get(0).getObject();
    }
491825
private function renderTemplate($isPartial = false, $isLayout = false)
    {
        $adapter = $this->determineWhichAdapterToUse($this->templateFile);
        $dirs = true === $isLayout ? $this->_layoutdir : $this->_scriptdir;

        if (null === $adapter) {
            throw new RendererException(sprintf(
                'Unable to manage file \'%s\' in path (%s)', $this->templateFile, implode(', ', $dirs)
            ), RendererException::SCRIPTFILE_ERROR);
        }

        $this->getApplication()->debug(sprintf('Rendering file `%s`.', $this->templateFile));
        if (false === $isPartial) {
            $this->triggerEvent();
        }

        return $adapter->renderTemplate(
            $this->templateFile,
            $dirs,
            $this->getParam(),
            array_merge($this->getAssignedVars(), $this->getBBVariable())
        );
    }
767991
public function isImageShown($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return $this->isShown('Image', $isFirst, $isMiddle, $isLast);
    }
486038
private function AttachContainerContent($isNew)
    {
        $provider = new ContainerContentTreeProvider($this->Container());
        $tree = new TreeBuilder($provider);
        $containerContent = $this->Content()->GetContainerContent();
        if (!$containerContent) {
            $containerContent = new ContainerContent();
            $containerContent->SetContainer($this->Container());
            $provider->AttachContent($containerContent, $this->Content());
        }
        if ($isNew) {
            $tree->Insert($containerContent, $this->ParentItem(), $this->PreviousItem());
        }
    }
1235473
public function view($strStatus = false, $prettyUrlState = '')
    {
        $globalConfig = $this->app->make('config');
        $siteConfig = $this->getSite()->getConfigRepository();

        $urlRewriting = (bool) $globalConfig->get('concrete.seo.url_rewriting');
        $this->set('fh', $this->app->make('helper/form'));
        $this->set('canonical_url', $siteConfig->get('seo.canonical_url'));
        $this->set('canonical_url_alternative', $siteConfig->get('seo.canonical_url_alternative'));
        $this->set('redirect_to_canonical_url', $globalConfig->get('concrete.seo.redirect_to_canonical_url'));
        $this->set('urlRewriting', $urlRewriting);
        $this->set('canonical_tag', $siteConfig->get('seo.canonical_tag.enabled'));

        $strStatus = (string) $strStatus;
        if ($strStatus === 'saved') {
            $message = t('Settings Saved.');
            $prettyUrlState = (string) $prettyUrlState;
            switch ($prettyUrlState) {
                case 'saved':
                case 'not-needed':
                    $manager = $this->app->make('Concrete\Core\Service\Manager\ServiceManager');
                    $services = $manager->getActiveServices();
                    $service = $services[0];
                    $rule = $service->getGenerator()->getRule('pretty_urls');
                    switch ($prettyUrlState) {
                        case 'saved':
                            if ($urlRewriting) {
                                $this->set('configuration_action', t('The following rule has been added to the server configuration'));
                            } else {
                                $this->set('configuration_action', t('The following rule has been removed from the server configuration'));
                            }
                            break;
                        case 'not-needed':
                            if ($urlRewriting) {
                                $this->set('configuration_action', t('The following rule was already in your server configuration'));
                            } else {
                                $this->set('configuration_action', t('The following rule was already missing in your server configuration'));
                            }
                            break;
                    }
                    $this->set('configuration_code', $rule->getCode());
                    break;
                case 'unrecognized':
                    $codes = array();
                    $manager = $this->app->make('Concrete\Core\Service\Manager\ServiceManager');
                    /* @var \Concrete\Core\Service\Manager\ServiceManager $manager */
                    foreach ($manager->getAllServices() as $service) {
                        $rule = $service->getGenerator()->getRule('pretty_urls');
                        if ($rule !== null) {
                            if (isset($codes[$rule->getCode()])) {
                                $codes[$rule->getCode()][] = $service->getName();
                            } else {
                                $codes[$rule->getCode()] = array($service->getName());
                            }
                        }
                    }
                    $actionMessage = t("It was not possible to detect your server kind.");
                    if ($urlRewriting) {
                        $actionMessage .= ' '.t("Here's the configuration sections for every supported server: please manually add the one relevant for you to your server configuration.");
                    } else {
                        $actionMessage .= ' '.t("Here's the configuration sections for every supported server: please manually remove the one relevant for you from your server configuration.");
                    }
                    $this->set('configuration_action', $actionMessage);
                    $joined = '';
                    foreach ($codes as $code => $serviceNames) {
                        if ($joined !== '') {
                            $joined .= "\n\n";
                        }
                        $joined .= '>>> ' . tc(/*i18n %s is one or more server names */'For server', 'For %s', implode(', ', $serviceNames)) . " <<<\n";
                        $joined .= $code;
                    }
                    $this->set('configuration_code', $joined);
                    break;
                case 'not-readable':
                case 'not-writable':
                    $manager = $this->app->make('Concrete\Core\Service\Manager\ServiceManager');
                    $services = $manager->getActiveServices();
                    $service = $services[0];
                    $rule = $service->getGenerator()->getRule('pretty_urls');
                    $actionMessage = '';
                    switch ($prettyUrlState) {
                        case 'not-readable':
                            $actionMessage .= t('It was not possible read your server configuration.');
                            break;
                        case 'not-writable':
                            $actionMessage .= t('It was not possible write your server configuration.');
                            break;
                    }
                    if ($urlRewriting) {
                        $actionMessage .= ' '.t('Please add this configuration section to your server configuration:');
                    } else {
                        $actionMessage .= ' '.t('Please remove this configuration section from your server configuration');
                    }
                    $this->set('configuration_action', $actionMessage);
                    $this->set('configuration_code', $rule->getCode());
                    break;
            }
            $this->set('message', $message);
        }
    }
1343545
public function addElement(MenuElement $menuElement, $isStartElement = false)
    {
        if (!in_array($menuElement, $this->elements, true)) {
            array_push($this->elements, $menuElement);
            if ($isStartElement) {
                // new start element
                $this->setStartElement($menuElement);
            } else {
                // additional element - set invisible
                $menuElement->getControl()
                            ->setVisible(false);
            }
        }
        return $this;
    }
799055
public function getSlideClassNames($isFirst = false, $isMiddle = false, $isLast = false)
    {
        $classes = parent::getClassNames();
        
        $classes[] = $this->ImageShown ? 'has-image' : 'no-image';
        
        if ($this->getParent()->hasMethod('getSlideClassNames')) {
            
            $classes = array_merge(
                $classes,
                $this->getParent()->getSlideClassNames(
                    $this,
                    $isFirst,
                    $isMiddle,
                    $isLast
                )
            );
            
        }
        
        $this->extend('updateSlideClassNames', $classes, $isFirst, $isMiddle, $isLast);
        
        return $classes;
    }
1002728
public function readInet($isCollectionElement = false) {
		if ($isCollectionElement) {
			$data = $this->read($this->readShort());
		} else {
			$data = $this->data;
		}
		return inet_ntop($data);
	}
89592
public static function table($table, $isQuery = false) {
        $new_self = new self();
        
        if ($isQuery) {
            $new_self->_table = '(' . $table . ')';
        } else {
            $new_self->_table = $table;
        }

        return $new_self;
    }
639939
private function openFile( $isFirst = false )
    {
        // cleanup file pointer if needed
        if ( $this->fp != null )
        {
            fclose( $this->fp );
            $this->fp = null;
        }

        // open the new file
        $file = $isFirst ? current( $this->files ) : next( $this->files );

        // loop until we can open a file.
        while ( $this->fp == null && $file !== false )
        {
            if ( $file === 'php://stdin' || file_exists( $file ) )
            {
                $fp = fopen( $file, 'r' );
                if ( $fp !== false )
                {
                    $this->fp = $fp;
                    return true;
                }
            }
            $file = next( $this->files );
        }
        return false;
    }
143395
public static function init($isFinal=true) {
		if( static::$validator ) {
			throw new \Exception('Class '.static::getClass().' with table '.static::$table.' is already initialized.');
		}
		if( static::$domain === NULL ) {
			static::$domain = static::$table;
		}
		if( $isFinal ) {
			$ed					= EntityDescriptor::load(static::$table, static::getClass());
			static::$fields		= $ed->getFieldsName();
			static::$validator	= $ed;
			static::$entityClasses[static::$table]	= static::getClass();
		}
	}
85696
public function strDash($str, $camelFirst = true)
    {
        if ($camelFirst) {
            $str = StrUtil::camel($str);
        }
        return StrUtil::dash($str);
    }
822797
public function isContentEmpty($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return !(
            $this->isHeaderShown($isFirst, $isMiddle, $isLast) ||
            $this->isDetailsShown($isFirst, $isMiddle, $isLast) ||
            $this->isSummaryShown($isFirst, $isMiddle, $isLast) ||
            $this->isContentShown($isFirst, $isMiddle, $isLast) ||
            $this->isFooterShown($isFirst, $isMiddle, $isLast)
        );
    }
92789
protected function lexList(bool $isConst): ListValueNode
    {
        $start = $this->lexer->getToken();

        $parseFunction = function () use ($isConst) {
            return $this->lexValue($isConst);
        };

        return new ListValueNode(
            $this->any(
                TokenKindEnum::BRACKET_L,
                $parseFunction,
                TokenKindEnum::BRACKET_R
            ),
            $this->createLocation($start)
        );
    }
992941
public function accordionItem($titleHtml, $bodyHtml = null, $options = array()) {
		$itemBodyId = str_replace('.', '', uniqid('accordion_body_', true));
		$titleLink = $this->link($titleHtml, '#' . $itemBodyId, array(
			'data-toggle' => 'collapse', 'data-parent' => '#' . $options['accordionId']
		));
		$heading = $this->tag('h4', $titleLink, array('class' => 'panel-title'));
		$body = $this->tag('div', $this->panelBody($bodyHtml), array(
			'class' => 'panel-collapse collapse in', 'id' => $itemBodyId
		));

		$blockRendering = $this->_blockRendering;
		$this->_blockRendering = false;
		$itemHtml = $this->panel($heading, $body, null, array('wrapBody' => false));
		$this->_blockRendering = $blockRendering;
		return $itemHtml;
	}
207078
public function getCheckboxes($fid, $is_admmod, $is_subscribed)
    {
        Container::get('hooks')->fire('model.post.get_checkboxes_start', $fid, $is_admmod, $is_subscribed);

        $cur_index = 1;

        $checkboxes = [];
        if ($fid && $is_admmod) {
            $checkboxes[] = '<label class="checkbox-inline">'.
                '<input type="checkbox" name="stick_topic" value="1" tabindex="'.
                ($cur_index++).'"'.(Input::post('stick_topic') ? ' checked="checked"' : '').' />'.
                __('Stick topic').'<br /></label>';
        }

        if (!User::get()->is_guest) {
            if (ForumSettings::get('o_smilies') == '1') {
                $checkboxes[] = '<label class="checkbox-inline">'.
                    '<input type="checkbox" name="hide_smilies" value="1" tabindex="'.
                    ($cur_index++).'"'.(Input::post('hide_smilies') ? ' checked="checked"' : '').' />'.
                    __('Hide smilies').'<br /></label>';
            }

            if (ForumSettings::get('o_topic_subscriptions') == '1') {
                $subscr_checked = false;

                // If it's a preview
                if (Input::post('preview')) {
                    $subscr_checked = (Input::post('subscribe')) ? true : false;
                } // If auto subscribed
                elseif (User::get()->auto_notify) {
                    $subscr_checked = true;
                } // If already subscribed to the topic
                elseif ($is_subscribed) {
                    $subscr_checked = true;
                }

                $checkboxes[] = '<label class="checkbox-inline">'.
                    '<input type="checkbox" name="subscribe" value="1" tabindex="'.
                    ($cur_index++).'"'.($subscr_checked ? ' checked="checked"' : '').' />'.
                    ($is_subscribed ? __('Stay subscribed') : __('Subscribe')).'<br /></label>';
            }
        } elseif (ForumSettings::get('o_smilies') == '1') {
            $checkboxes[] = '<label class="checkbox-inline">'.
                '<input type="checkbox" name="hide_smilies" value="1" tabindex="'.
                ($cur_index++).'"'.(Input::post('hide_smilies') ? ' checked="checked"' : '').' />'.
                __('Hide smilies').'<br /></label>';
        }

        $checkboxes = Container::get('hooks')->fire('model.post.get_checkboxes', $checkboxes);

        return $checkboxes;
    }