Creates summary text of for the drop zone

@return string
553597
public function summarise() {
        if (trim($this->text) != '') {
            $summariseplace =
                        get_string('summariseplace', 'qtype_ddimageortext', $this);
        } else {
            $summariseplace =
                    get_string('summariseplaceno', 'qtype_ddimageortext', $this->no);
        }
        return $summariseplace;
    }
1259425
protected function collectSummary()
    {
        if (Yii::$app === null) {
            return '';
        }

        $request = Yii::$app->getRequest();
        $entry = '';
        try {
            $entry = $request->getAbsoluteUrl();
        } catch (\Exception $e) {
            $entry = 'console';
        }

        $summary = [
            'tag' => $this->tag,
            'entry' => $entry,
        ];

        return $summary;
    }
1035257
public function GetDescriptionAsHTML()
    {
        $sText = trim($this->fieldDescription);
        $sText = TGlobal::OutHTML($sText);
        $sText = nl2br($sText);

        return $sText;
    }
414683
public function getSpanSummary()
    {
        $summary = [];
        
        $span = $this->dbObject('Span');
        
        foreach ($span->getViewports() as $viewport) {
            
            if ($value = $span->getField($viewport)) {
                $summary[] = sprintf('%s: %s', $viewport, $value);
            }
            
        }
        
        return implode(', ', $summary);
    }
683631
private function _writeSummaryInformation(){
		// offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark)
		$data = pack('v', 0xFFFE);
		// offset: 2; size: 2;
		$data .= pack('v', 0x0000);
		// offset: 4; size: 2; OS version
		$data .= pack('v', 0x0106);
		// offset: 6; size: 2; OS indicator
		$data .= pack('v', 0x0002);
		// offset: 8; size: 16
		$data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00);
		// offset: 24; size: 4; section count
		$data .= pack('V', 0x0001);

		// offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9
		$data .= pack('vvvvvvvv', 0x85E0, 0xF29F, 0x4FF9, 0x1068, 0x91AB, 0x0008, 0x272B, 0xD9B3);
		// offset: 44; size: 4; offset of the start
		$data .= pack('V', 0x30);

		// SECTION
		$dataSection = array();
		$dataSection_NumProps = 0;
		$dataSection_Summary = '';
		$dataSection_Content = '';

		// CodePage : CP-1252
		$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x01),
							   'offset' => array('pack' => 'V'),
							   'type' 	=> array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer
							   'data'	=> array('data' => 1252));
		$dataSection_NumProps++;

		//	Title
		if($this->_phpExcel->getProperties()->getTitle()){
			$dataProp = $this->_phpExcel->getProperties()->getTitle();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x02),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
								   'data'	=> array('data' => $dataProp, 'length' => strlen($dataProp)));
			$dataSection_NumProps++;
		}
		//	Subject
		if($this->_phpExcel->getProperties()->getSubject()){
			$dataProp = $this->_phpExcel->getProperties()->getSubject();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x03),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
								   'data'	=> array('data' => $dataProp, 'length' => strlen($dataProp)));
			$dataSection_NumProps++;
		}
		//	Author (Creator)
		if($this->_phpExcel->getProperties()->getCreator()){
			$dataProp = $this->_phpExcel->getProperties()->getCreator();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x04),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
								   'data'	=> array('data' => $dataProp, 'length' => strlen($dataProp)));
			$dataSection_NumProps++;
		}
		//	Keywords
		if($this->_phpExcel->getProperties()->getKeywords()){
			$dataProp = $this->_phpExcel->getProperties()->getKeywords();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x05),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
								   'data'	=> array('data' => $dataProp, 'length' => strlen($dataProp)));
			$dataSection_NumProps++;
		}
		//	Comments (Description)
		if($this->_phpExcel->getProperties()->getDescription()){
			$dataProp = $this->_phpExcel->getProperties()->getDescription();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x06),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
								   'data'	=> array('data' => $dataProp, 'length' => strlen($dataProp)));
			$dataSection_NumProps++;
		}
		//	Last Saved By (LastModifiedBy)
		if($this->_phpExcel->getProperties()->getLastModifiedBy()){
			$dataProp = $this->_phpExcel->getProperties()->getLastModifiedBy();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x08),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
								   'data'	=> array('data' => $dataProp, 'length' => strlen($dataProp)));
			$dataSection_NumProps++;
		}
		//	Created Date/Time
		if($this->_phpExcel->getProperties()->getCreated()){
			$dataProp = $this->_phpExcel->getProperties()->getCreated();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0C),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
								   'data'	=> array('data' => PHPExcel_Shared_OLE::LocalDate2OLE($dataProp)));
			$dataSection_NumProps++;
		}
		//	Modified Date/Time
		if($this->_phpExcel->getProperties()->getModified()){
			$dataProp = $this->_phpExcel->getProperties()->getModified();
			$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D),
								   'offset' => array('pack' => 'V'),
								   'type' 	=> array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
								   'data'	=> array('data' => PHPExcel_Shared_OLE::LocalDate2OLE($dataProp)));
			$dataSection_NumProps++;
		}
		//	Security
		$dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x13),
							   'offset' => array('pack' => 'V'),
							   'type' 	=> array('pack' => 'V', 'data' => 0x03), // 4 byte signed integer
							   'data'	=> array('data' => 0x00));
		$dataSection_NumProps++;


		// 		4 	Section Length
		//		4 	Property count
		//		8 * $dataSection_NumProps (8 =  ID (4) + OffSet(4))
		$dataSection_Content_Offset = 8 + $dataSection_NumProps * 8;
		foreach ($dataSection as $dataProp){
			// Summary
			$dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']);
			// Offset
			$dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset);
			// DataType
			$dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']);
			// Data
			if($dataProp['type']['data'] == 0x02){ // 2 byte signed integer
				$dataSection_Content .= pack('V', $dataProp['data']['data']);

				$dataSection_Content_Offset += 4 + 4;
			}
			elseif($dataProp['type']['data'] == 0x03){ // 4 byte signed integer
				$dataSection_Content .= pack('V', $dataProp['data']['data']);

				$dataSection_Content_Offset += 4 + 4;
			}
			elseif($dataProp['type']['data'] == 0x1E){ // null-terminated string prepended by dword string length
				// Null-terminated string
				$dataProp['data']['data'] .= chr(0);
				$dataProp['data']['length'] += 1;
				// Complete the string with null string for being a %4
				$dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4)==4 ? 0 : (4 - $dataProp['data']['length'] % 4));
				$dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT);

				$dataSection_Content .= pack('V', $dataProp['data']['length']);
				$dataSection_Content .= $dataProp['data']['data'];

				$dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']);
			}
			elseif($dataProp['type']['data'] == 0x40){ // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
				$dataSection_Content .= $dataProp['data']['data'];

				$dataSection_Content_Offset += 4 + 8;
			}
			else {
				// Data Type Not Used at the moment
			}
		}
		// Now $dataSection_Content_Offset contains the size of the content

		// section header
		// offset: $secOffset; size: 4; section length
		// 		+ x  Size of the content (summary + content)
		$data .= pack('V', $dataSection_Content_Offset);
		// offset: $secOffset+4; size: 4; property count
		$data .= pack('V', $dataSection_NumProps);
		// Section Summary
		$data .= $dataSection_Summary;
		// Section Content
		$data .= $dataSection_Content;

		return $data;
	}
1115088
public function renderSummary()
	{
		if(($count=$this->dataProvider->getItemCount())<=0)
			return;

		echo CHtml::openTag($this->summaryTagName, array('class'=>$this->summaryCssClass));
		if($this->enablePagination)
		{
			$pagination=$this->dataProvider->getPagination();
			$total=$this->dataProvider->getTotalItemCount();
			$start=$pagination->currentPage*$pagination->pageSize+1;
			$end=$start+$count-1;
			if($end>$total)
			{
				$end=$total;
				$start=$end-$count+1;
			}
			if(($summaryText=$this->summaryText)===null)
				$summaryText=Yii::t('zii','Displaying {start}-{end} of 1 result.|Displaying {start}-{end} of {count} results.',$total);
			echo strtr($summaryText,array(
				'{start}'=>$start,
				'{end}'=>$end,
				'{count}'=>$total,
				'{page}'=>$pagination->currentPage+1,
				'{pages}'=>$pagination->pageCount,
			));
		}
		else
		{
			if(($summaryText=$this->summaryText)===null)
				$summaryText=Yii::t('zii','Total 1 result.|Total {count} results.',$count);
			echo strtr($summaryText,array(
				'{count}'=>$count,
				'{start}'=>1,
				'{end}'=>$count,
				'{page}'=>1,
				'{pages}'=>1,
			));
		}
		echo CHtml::closeTag($this->summaryTagName);
	}
311764
function innertext()
    {
        if (isset($this->_[HDOM_INFO_INNER])) {
            return $this->_[HDOM_INFO_INNER];
        }
        if (isset($this->_[HDOM_INFO_TEXT])) {
            return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);
        }

        $ret = '';
        foreach ($this->nodes as $n) {
            $ret .= $n->outertext();
        }
        return $ret;
    }
1120251
public function getReportField()
    {
        Requirements::css('bringyourownideas/silverstripe-maintenance: client/dist/styles/bundle.css');
        Requirements::javascript('bringyourownideas/silverstripe-maintenance: client/dist/js/bundle.js');

        /** @var GridField $grid */
        $grid = parent::getReportField();

        /** @var GridFieldConfig $config */
        $config = $grid->getConfig();

        $grid->addExtraClass('site-summary');

        $summaryFields = Package::create()->summaryFields();
        /** @var GridFieldExportButton $exportButton */
        $exportButton = $config->getComponentByType(GridFieldExportButton::class);
        $exportButton->setExportColumns($summaryFields);
        /** @var GridFieldPrintButton $printButton */
        $printButton = $config->getComponentByType(GridFieldPrintButton::class);
        $printButton->setPrintColumns($summaryFields);

        $versionHtml = ArrayData::create([
            'Title' => _t(__CLASS__ . '.VERSION', 'Version'),
            'Version' => $this->resolveCmsVersion(),
            'LastUpdated' => $this->getLastUpdated(),
        ])->renderWith(__CLASS__ . '/VersionHeader');

        $config->addComponents(
            Injector::inst()->create(GridFieldRefreshButton::class, 'buttons-before-left'),
            Injector::inst()->create(
                GridFieldLinkButton::class,
                'https://addons.silverstripe.org',
                _t(__CLASS__ . '.LINK_TO_ADDONS', 'Explore Addons'),
                'buttons-before-left'
            ),
            $this->getDropdownFilter(),
            $this->getInfoLink(),
            Injector::inst()->create(GridFieldHtmlFragment::class, 'header', $versionHtml)
        );

        // Re-order the paginator to ensure it counts correctly, and reorder the buttons
        $paginator = $config->getComponentByType(GridFieldPaginator::class);
        $config->removeComponent($paginator)->addComponent($paginator);

        $exportButton = $config->getComponentByType(GridFieldExportButton::class);
        $config->removeComponent($exportButton)->addComponent($exportButton);

        $printButton = $config->getComponentByType(GridFieldPrintButton::class);
        $config->removeComponentsByType($printButton)->addComponent($printButton);

        return $grid;
    }
787494
public function getStatusText()
    {
        $statusCode = $this->getStatusCode();

        if (!isset($this->defaultStatusTextList[$statusCode])) {
            return '';
        }

        return $this->defaultStatusTextList[$statusCode];
    }
757747
public function debug_summary() {
        $summary = '';
        $summary .= 'General type: ' . $this->pagelayout . '. ';
        if (!during_initial_install()) {
            $summary .= 'Context ' . $this->context->get_context_name() . ' (context id ' . $this->_context->id . '). ';
        }
        $summary .= 'Page type ' . $this->pagetype .  '. ';
        if ($this->subpage) {
            $summary .= 'Sub-page ' . $this->subpage .  '. ';
        }
        return $summary;
    }
1261284
public function getLeadingCommentAndWhitespaceText() : string {
        // TODO re-tokenize comments and whitespace
        $fileContents = $this->getFileContents();
        foreach ($this->getDescendantTokens() as $token) {
            return $token->getLeadingCommentsAndWhitespaceText($fileContents);
        }
    }
104184
public function getSummary()
    {
        ob_start();

        printf(
            "%s error in file '%s' line %s",
            $this->getSeverityString(),
            $this->file,
            $this->line
        );

        return ob_get_clean();
    }
1028566
public function _reportSummary($summary)
    {
        $passed = $summary->passed();
        $skipped = $summary->skipped();
        $pending = $summary->pending();
        $excluded = $summary->excluded();
        $failed = $summary->failed();
        $errored = $summary->errored();
        $expectation = $summary->expectation();
        $total = $summary->executable();

        $this->write("Expectations   : ");
        $this->write("{$expectation} Executed");
        $this->write("\n");
        $this->write("Specifications : ");
        $this->write("{$pending} Pending", 'cyan');
        $this->write(", ");
        $this->write("{$excluded} Excluded", 'yellow');
        $this->write(", ");
        $this->write("{$skipped} Skipped", 'light-grey');
        $this->write("\n\n");
        $this->write('Passed ' . ($passed), 'green');
        $this->write(" of {$total} ");

        if ($failed + $errored) {
            $this->write('FAIL ', 'red');
            $this->write('(');
            $comma = false;
            if ($failed) {
                $this->write('FAILURE: ' . $failed, 'red');
                $comma = true;
            }
            if ($errored) {
                if ($comma) {
                    $this->write(', ');
                }
                $this->write('EXCEPTION: ' . $errored, 'magenta');
            }
            $this->write(')');
        } else {
            $this->write('PASS', 'green');
        }
        $time = number_format(microtime(true) - $this->_start, 3);
        $memory = $this->readableSize($summary->memoryUsage());
        $this->write(" in {$time} seconds (using {$memory}B)");
        $this->write("\n\n");

        $this->_reportFocused($summary);
    }
841075
public function renderDropForeignKeys()
    {
        $foreignKeys = $this->getTableForeignKeys();

        if (!$foreignKeys) {
            return '';
        }

        $source = '';
        foreach ($foreignKeys as $foreignKey) {
            $name = $this->serializeIndexNameToAttribute($foreignKey->getName());
            $source .= "\n" . '$table->dropForeign(' . $name . ');';
        }

        return trim($source);
    }
1159216
public function getFullMessage(): string {
        $paras = [];

        if (!empty($this->getMainMessage())) {
            $paras[] = $this->getMainMessage();
        } elseif ($this->getErrorCount() === 0) {
            return '';
        }

        if (isset($this->errors[''])) {
            $paras[] = $this->formatErrorList('', $this->errors['']);
        }

        foreach ($this->errors as $field => $errors) {
            if ($field === '') {
                continue;
            }
            $paras[] = $this->formatErrorList($field, $errors);
        }

        $result = implode("\n\n", $paras);
        return $result;
    }
406118
public function getDescription()
    {
        return vsprintf(
            'The value is expected to be between %f and %f'
            . ' (%f <= x <= %f).',
            [$this->min, $this->max, $this->min, $this->max]
        );
    }
1130254
public function getTitleSummary() {

		$starting = date('F Y', strtotime($this->StartingDate));
		$ending = date('F Y', strtotime($this->EndingDate));

		// The following is required so HTML isn't automatically escaped.

		$output = DBHTMLText::create();
		$output->setValue("<strong>{$starting}</strong> → <strong>{$ending}</strong>");
		return $output;
	}