src/Event/Model/ModelAfterSaveListener.php
protected function getAttendeesFields(Table $table, array $modules) : array
    {
        $associations = [];
        foreach ($table->associations() as $association) {
            if (in_array(Inflector::humanize($association->getTarget()->getTable()), $modules)) {
                $associations[] = $association;
            }
        }

        if (empty($associations)) {
            return [];
        }

        $result = [];
        foreach ($associations as $association) {
            $foreignKey = $association->getForeignKey();
            if (!is_string($foreignKey)) {
                throw new UnsupportedForeignKeyException();
            }
            if (in_array($foreignKey, $this->skipAttendeesIn)) {
                continue;
            }
            $result[] = $foreignKey;
        }

        return $result;
    }
protected function getAttendeesFields(Table $table, array $modules) : array
    {
        $associations = [];
        foreach ($table->associations() as $association) {
            if (in_array(Inflector::humanize($association->getTarget()->getTable()), $modules)) {
                $associations[] = $association;
            }
        }

        if (empty($associations)) {
            return [];
        }

        $result = [];
        foreach ($associations as $association) {
            $foreignKey = $association->getForeignKey();
            if (!is_string($foreignKey)) {
                throw new UnsupportedForeignKeyException();
            }
            if (in_array($foreignKey, $this->skipAttendeesIn)) {
                continue;
            }
            $result[] = $foreignKey;
        }

        return $result;
    }
protected function getAttendeesFields ( Table $ table , array $ modules ) : array { $ associations = [ ] ; foreach ( $ table -> associations ( ) as $ association ) { if ( in_array ( Inflector :: humanize ( $ association -> getTarget ( ) -> getTable ( ) ) , $ modules ) ) { $ associations [ ] = $ association ; } } if ( empty ( $ associations ) ) { return [ ] ; } $ result = [ ] ; foreach ( $ associations as $ association ) { $ foreignKey = $ association -> getForeignKey ( ) ; if ( ! is_string ( $ foreignKey ) ) { throw new UnsupportedForeignKeyException ( ) ; } if ( in_array ( $ foreignKey , $ this -> skipAttendeesIn ) ) { continue ; } $ result [ ] = $ foreignKey ; } return $ result ; }
Retrieve attendees fields from current Table's associations.

@param \Cake\ORM\Table $table Table instance
@param string[] $modules Reminder to modules
@return string[]
Retrieve attendees fields from current Table s associations .