Пример #1
0
?>
        </div>

    </div>
    <div class="col-md-6 col-sm-12">
        <?php 
foreach ($propertyGroups as $groupId => $properties) {
    ?>

            <?php 
    if (count($properties) > 0) {
        $group = \app\models\PropertyGroup::findById($groupId);
        if (intval($group->hidden_group_title) == 0) {
            echo Html::tag('h2', $group->name);
        }
        $properties = app\models\Property::getForGroupId($groupId);
        foreach ($properties as $prop) {
            $property_values = $model->getPropertyValuesByPropertyId($prop->id);
            echo $prop->handler($form, $model->getAbstractModel(), $property_values, 'frontend_edit_view');
        }
    }
    ?>


        <?php 
}
?>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
Пример #2
0
<?php

if (!empty($gaID = app\models\Property::getPropertyValue('google_analytics_id', ''))) {
    ?>
<!-- Google Analytics -->
<script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', '<?php 
    echo $gaID;
    ?>
', 'auto');
    ga('send', 'pageview');
</script>
<script async src='//www.google-analytics.com/analytics.js'></script>
<!-- End Google Analytics -->
<?php 
}
echo $widget_id;
?>
" itemprop="propertiesList" itemscope itemtype="http://schema.org/ItemList">

<?php 
if (!empty($object_property_groups)) {
    foreach ($object_property_groups as $i => $opg) {
        if ($opg->group->is_internal) {
            continue;
        }
        $options = ['id' => 'pg-' . $opg->group->id, 'class' => 'object-property-group'];
        if ($i == 0) {
            \kartik\helpers\Html::addCssClass($options, 'active');
        }
        echo \kartik\helpers\Html::beginTag('div', $options);
        /** @var \app\models\Property[] $properties */
        $properties = app\models\Property::getForGroupId($opg->group->id);
        foreach ($properties as $prop) {
            if ($property_values = $model->getPropertyValuesByPropertyId($prop->id)) {
                echo $prop->handler($form, $model->getAbstractModel(), $property_values, 'frontend_render_view');
            }
        }
        echo "</div>";
    }
} else {
    echo '<!-- Empty properties -->';
}
?>

</div> <!-- /properties-widget -->