quote() public static method

Generates a quote.
public static quote ( string $text, array $htmlOptions = [] ) : string
$text string the quoted text.
$htmlOptions array additional HTML attributes.
return string the generated quote.
Exemplo n.º 1
0
 public function testQuote()
 {
     $I = $this->codeGuy;
     $html = TbHtml::quote('Quote text', array('paragraphOptions' => array('class' => 'paragraph'), 'source' => 'Source text', 'sourceOptions' => array('class' => 'source'), 'cite' => 'Cited text', 'citeOptions' => array('class' => 'cite')));
     $blockquote = $I->createNode($html, 'blockquote');
     $I->seeNodeChildren($blockquote, array('p', 'small'));
     $p = $blockquote->filter('p');
     $I->seeNodeCssClass($p, 'paragraph');
     $I->seeNodeText($p, 'Quote text');
     $small = $blockquote->filter('blockquote > small');
     $I->seeNodeCssClass($small, 'source');
     $I->seeNodeText($small, 'Source text');
     $cite = $small->filter('small > cite');
     $I->seeNodeCssClass($cite, 'cite');
     $I->seeNodeText($cite, 'Cited text');
     // todo: consider writing a test including the pull-right quote as well.
 }
Exemplo n.º 2
0
        <?php 
echo TbHtml::quote('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.', array('source' => 'Someone famous in', 'cite' => 'Source Title'));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::quote('...', array(
    'source' => 'Someone famous in',
    'cite' => 'Source Title',
)); ?></pre>

    <h4>Alternative displays</h4>

    <div class="bs-docs-example">
        <div class="clearfix">
            <?php 
echo TbHtml::quote('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.', array('source' => 'Someone famous in', 'cite' => 'Source Title', 'pull' => TbHtml::PULL_RIGHT));
?>
        </div>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::quote('...', array(
    'source' => 'Someone famous in',
    'cite' => 'Source Title',
    'pull' => TbHtml::PULL_RIGHT,
)); ?></pre>

</section>

<!-- Code
    ================================================== -->
<section id="code">
Exemplo n.º 3
0
    <?php 
echo TbHtml::submitButton('Оновити', array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'class' => 'inline'));
$this->endWidget();
?>

<?php 
echo TbHtml::lead('Статуси про претендента &laquo;' . $model->first_name . ' ' . $model->last_name . '&raquo;');
$statusList = array();
foreach ($statuses as $s) {
    /* @var $s CvStatuses */
    $date = Yii::app()->dateFormatter->formatDateTime($s->added_time, "long");
    $vacancies = '';
    foreach ($s->vacancies as $vacancy) {
        $vacancies .= CHtml::link($vacancy->name, ['vacancies/view', 'id' => $vacancy->id]) . " (" . VacancyHelper::statusName($vacancy) . ")";
    }
    echo TbHtml::quote(nl2br($s->message), ['site' => '', 'source' => Yii::t('main', 'vacancy.status.posted') . ': ' . $date . " (" . CHtml::link($s->operator->getFirstLastName(), array('/manage/reqruiter', 'id' => $s->operator->id)) . ")" . (!empty($vacancies) ? ' | ' . Yii::t('main', 'vacancy.status.marked') . ': ' . $vacancies . ' ' : '')]);
}
?>
<hr />
<?php 
echo TbHtml::lead('Оновити статус:');
?>
<a name="statuses"></a>
<?php 
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'status-form', 'enableAjaxValidation' => true, 'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL, 'clientOptions' => array('validateOnSubmit' => true)));
/* @var $form TbActiveForm */
?>
    <fieldset>
        <?php 
echo $form->hiddenField($status, 'cv_id', ['value' => $model->id]);
?>