lovata/oc-toolbox-plugin

View on GitHub
classes/parser/templates/active_list_store.stub

Summary

Maintainability
Test Coverage
<?php namespace {{studly_author}}\{{studly_plugin}}\Classes\Store\{{studly_model}};

use Lovata\Toolbox\Classes\Store\AbstractStoreWithoutParam;
use {{studly_expansion_author}}\{{studly_expansion_plugin}}\Models\{{studly_model}};

/**
 * Class ActiveListStore
 * @package {{studly_author}}\{{studly_plugin}}\Classes\Store\{{studly_model}}
 [[developer]]* @author {{developer}}
 [[developer]]*/
class ActiveListStore extends AbstractStoreWithoutParam
{
    protected static $instance;

    /**
     * Get ID list from database
     * @return array
     */
    protected function getIDListFromDB() : array
    {
        $arElementIDList = (array) {{studly_model}}::active()->pluck('id')->all();

        return $arElementIDList;
    }
}