skeeks\cms\models\CmsComponentSettings::baseQuery PHP Method

baseQuery() public static method

public static baseQuery ( Component $component ) : ActiveQuery
$component skeeks\cms\base\Component
return yii\db\ActiveQuery
    public static function baseQuery($component)
    {
        $query = static::find()->where(['component' => $component->className()]);
        if ($component->namespace) {
            $query->andWhere(['namespace' => $component->namespace]);
        }
        return $query;
    }

Usage Example

Beispiel #1
0
 */
/* @var $this yii\web\View */
?>

<?php 
echo $this->render('_header', ['component' => $component]);
?>


    <div class="sx-box sx-mb-10 sx-p-10">
        <p><?php 
echo \Yii::t('app', 'Erase all the settings from the database for this component.');
?>
</p>
        <?php 
if ($settingsAllCount = \skeeks\cms\models\CmsComponentSettings::baseQuery($component)->count()) {
    ?>
            <p><b><?php 
    echo \Yii::t('app', 'Total found');
    ?>
:</b> <?php 
    echo $settingsAllCount;
    ?>
</p>
            <button type="submit" class="btn btn-danger btn-xs" onclick="sx.ComponentSettings.Remove.removeAll(); return false;">
                <i class="glyphicon glyphicon-remove"></i> <?php 
    echo \Yii::t('app', 'reset all settings');
    ?>
            </button>
        <?php 
} else {
All Usage Examples Of skeeks\cms\models\CmsComponentSettings::baseQuery