public function updateDataSchema(&$schema)
    {
        // The keys from the SecurityAlert model that we need in the React component
        $keysToPass = ['Identifier', 'ExternalLink'];

        $alerts = [];
        foreach ($this->owner->SecurityAlerts()->toNestedArray() as $alert) {
            $alerts[] = array_intersect_key($alert, array_flip($keysToPass));
        }

        $schema['securityAlerts'] = $alerts;
    }
public function updateDataSchema(&$schema)
    {
        // The keys from the SecurityAlert model that we need in the React component
        $keysToPass = ['Identifier', 'ExternalLink'];

        $alerts = [];
        foreach ($this->owner->SecurityAlerts()->toNestedArray() as $alert) {
            $alerts[] = array_intersect_key($alert, array_flip($keysToPass));
        }

        $schema['securityAlerts'] = $alerts;
    }
public function updateDataSchema ( & $ schema ) { // The keys from the SecurityAlert model that we need in the React component $ keysToPass = [ 'Identifier' , 'ExternalLink' ] ; $ alerts = [ ] ; foreach ( $ this -> owner -> SecurityAlerts ( ) -> toNestedArray ( ) as $ alert ) { $ alerts [ ] = array_intersect_key ( $ alert , array_flip ( $ keysToPass ) ) ; } $ schema [ 'securityAlerts' ] = $ alerts ; }
Adds security alert notifications into the schema

@param array &$schema
@return string
Adds security alert notifications into the schema