src/Event/Model/ModelAfterSaveListener.php
protected function getEventOptions(CsvTable $table, EntityInterface $entity, string $startField) : array
    {
        // Event start and end times
        $eventTimes = $this->getEventTime($entity, $startField);

        $mailer = new IcEmail($table, $entity);

        $result = [
            'id' => $entity->get('id'),
            'sequence' => $entity->isNew() ? 0 : time(),
            'summary' => $mailer->getEventSubject(),
            'description' => $mailer->getEventContent(),
            'location' => (string)$entity->get('location'),
            'startTime' => $eventTimes['start'],
            'endTime' => $eventTimes['end'],
        ];

        return $result;
    }
protected function getEventOptions(CsvTable $table, EntityInterface $entity, string $startField) : array
    {
        // Event start and end times
        $eventTimes = $this->getEventTime($entity, $startField);

        $mailer = new IcEmail($table, $entity);

        $result = [
            'id' => $entity->get('id'),
            'sequence' => $entity->isNew() ? 0 : time(),
            'summary' => $mailer->getEventSubject(),
            'description' => $mailer->getEventContent(),
            'location' => (string)$entity->get('location'),
            'startTime' => $eventTimes['start'],
            'endTime' => $eventTimes['end'],
        ];

        return $result;
    }
protected function getEventOptions ( CsvTable $ table , EntityInterface $ entity , string $ startField ) : array { // Event start and end times $ eventTimes = $ this -> getEventTime ( $ entity , $ startField ) ; $ mailer = new IcEmail ( $ table , $ entity ) ; $ result = [ 'id' => $ entity -> get ( 'id' ) , 'sequence' => $ entity -> isNew ( ) ? 0 : time ( ) , 'summary' => $ mailer -> getEventSubject ( ) , 'description' => $ mailer -> getEventContent ( ) , 'location' => ( string ) $ entity -> get ( 'location' ) , 'startTime' => $ eventTimes [ 'start' ] , 'endTime' => $ eventTimes [ 'end' ] , ] ; return $ result ; }
Get options for the new event

@param \CsvMigrations\Table $table Table instance
@param \Cake\Datasource\EntityInterface $entity Entity instance
@param string $startField Entity field to use for event start time
@return mixed[]
Get options for the new event