Provides AdvAgg with saved aggregrate information using a key value store.

Hierarchy

  • class \Drupal\advagg\State\State extends \Drupal\Core\State\State
    • class \Drupal\advagg\State\Aggregates extends \Drupal\advagg\State\State implements \Drupal\Core\State\StateInterface

Expanded class hierarchy of Aggregates

1 string reference to 'Aggregates'
advagg.services.yml in ./advagg.services.yml
advagg.services.yml
1 service uses Aggregates
state.advagg.aggregates in ./advagg.services.yml
Drupal\advagg\State\Aggregates

File

src/State/Aggregates.php, line 13

Namespace

Drupal\advagg\State
View source
class Aggregates extends State implements StateInterface {
    
    /**
     * Constructs the State object.
     *
     * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory
     *   The key value store to use.
     * @param \Drupal\Core\Cache\CacheBackendInterface $cache
     *   The cache object to use.
     * @param \Drupal\Core\Lock\LockBackendInterface $lock
     *   The lock object to use.
     */
    public function __construct(KeyValueFactoryInterface $key_value_factory, CacheBackendInterface $cache, LockBackendInterface $lock) {
        parent::__construct($key_value_factory, $cache, $lock);
        $this->keyValueStore = $key_value_factory->get('advagg_aggregates');
        $this->pathColumn = 'uri';
    }

}

Members

Title Sort descending Modifiers Object type Summary
Aggregates::__construct public function Constructs the State object.
State::$pathColumn protected property If the array isn't keyed by filepath the column the filepath is stored in.
State::clearMissingFiles public function Scan the filesystem for missing files and removee from database.
State::deleteAll public function Delete all stored information from this Key Value Store.
State::getAll public function Gets all stored information from this Key Value Store.
State::getRandom public function Get a semi-random (randomness not guaranteed) value.
State::getRandomKey public function Get a semi-random (randomness not guaranteed) key.