src/Charcoal/Admin/Ui/CollectionContainerTrait.php
public function objectRows()
    {
        // Get properties as defined in object's list metadata
        $properties  = $this->sortProperties();
        $propOptions = $this->propertiesOptions();

        // Collection objects
        $objects = $this->sortObjects();

        // Go through each object to generate an array of properties listed in object's list metadata
        foreach ($objects as $object) {
            if (isset($object['requiredAclPermissions']) && !empty($object['requiredAclPermissions'])) {
                if ($this->hasPermissions($object['requiredAclPermissions']) === false) {
                    continue;
                }
            }

            $objectProperties = [];
            foreach ($properties as $propertyIdent => $propertyData) {
                $property = $object->property($propertyIdent);

                if (isset($propOptions[$propertyIdent]) && is_array($propOptions[$propertyIdent])) {
                    $property->setData($propOptions[$propertyIdent]);
                }

                $this->setupDisplayPropertyValue($object, $property);

                $displayType = $this->display->displayType();
                $this->display->setPropertyVal($object->propertyValue($propertyIdent));

                $propertyValue = $this->view()->renderTemplate($displayType, $this->display);

                $cell = $this->parsePropertyCell($object, $property, $propertyValue);
                $objectProperties[] = $cell;
            };

            $this->currentObj = $object;
            $this->currentObjId = $object->id();

            $row = $this->parseObjectRow($object, $objectProperties);

            yield $row;
        }

        $this->currentObj = null;
        $this->currentObjId = null;
    }
public function objectRows()
    {
        // Get properties as defined in object's list metadata
        $properties  = $this->sortProperties();
        $propOptions = $this->propertiesOptions();

        // Collection objects
        $objects = $this->sortObjects();

        // Go through each object to generate an array of properties listed in object's list metadata
        foreach ($objects as $object) {
            if (isset($object['requiredAclPermissions']) && !empty($object['requiredAclPermissions'])) {
                if ($this->hasPermissions($object['requiredAclPermissions']) === false) {
                    continue;
                }
            }

            $objectProperties = [];
            foreach ($properties as $propertyIdent => $propertyData) {
                $property = $object->property($propertyIdent);

                if (isset($propOptions[$propertyIdent]) && is_array($propOptions[$propertyIdent])) {
                    $property->setData($propOptions[$propertyIdent]);
                }

                $this->setupDisplayPropertyValue($object, $property);

                $displayType = $this->display->displayType();
                $this->display->setPropertyVal($object->propertyValue($propertyIdent));

                $propertyValue = $this->view()->renderTemplate($displayType, $this->display);

                $cell = $this->parsePropertyCell($object, $property, $propertyValue);
                $objectProperties[] = $cell;
            };

            $this->currentObj = $object;
            $this->currentObjId = $object->id();

            $row = $this->parseObjectRow($object, $objectProperties);

            yield $row;
        }

        $this->currentObj = null;
        $this->currentObjId = null;
    }
public function objectRows ( ) { // Get properties as defined in object's list metadata $ properties = $ this -> sortProperties ( ) ; $ propOptions = $ this -> propertiesOptions ( ) ; // Collection objects $ objects = $ this -> sortObjects ( ) ; // Go through each object to generate an array of properties listed in object's list metadata foreach ( $ objects as $ object ) { if ( isset ( $ object [ 'requiredAclPermissions' ] ) && ! empty ( $ object [ 'requiredAclPermissions' ] ) ) { if ( $ this -> hasPermissions ( $ object [ 'requiredAclPermissions' ] ) === false ) { continue ; } } $ objectProperties = [ ] ; foreach ( $ properties as $ propertyIdent => $ propertyData ) { $ property = $ object -> property ( $ propertyIdent ) ; if ( isset ( $ propOptions [ $ propertyIdent ] ) && is_array ( $ propOptions [ $ propertyIdent ] ) ) { $ property -> setData ( $ propOptions [ $ propertyIdent ] ) ; } $ this -> setupDisplayPropertyValue ( $ object , $ property ) ; $ displayType = $ this -> display -> displayType ( ) ; $ this -> display -> setPropertyVal ( $ object -> propertyValue ( $ propertyIdent ) ) ; $ propertyValue = $ this -> view ( ) -> renderTemplate ( $ displayType , $ this -> display ) ; $ cell = $ this -> parsePropertyCell ( $ object , $ property , $ propertyValue ) ; $ objectProperties [ ] = $ cell ; } ; $ this -> currentObj = $ object ; $ this -> currentObjId = $ object -> id ( ) ; $ row = $ this -> parseObjectRow ( $ object , $ objectProperties ) ; yield $ row ; } $ this -> currentObj = null ; $ this -> currentObjId = null ; }
Supplies properties for objects in table template specific to object configuration.

@return array This metod is a generator.
Supplies properties for objects in table template specific to object configuration .