Swat/SwatCellRendererContainer.php
public function addMappingToRenderer(
        $renderer,
        $data_field,
        $property,
        $object = null
    ) {
        if ($object !== null) {
            $property = $renderer->getPropertyNameToMap($object, $property);
        }

        $mapping = new SwatCellRendererMapping($property, $data_field);
        $this->renderers->addMappingToRenderer($renderer, $mapping);

        if ($object !== null) {
            $object->$property = $mapping;
        }

        return $mapping;
    }
public function addMappingToRenderer(
        $renderer,
        $data_field,
        $property,
        $object = null
    ) {
        if ($object !== null) {
            $property = $renderer->getPropertyNameToMap($object, $property);
        }

        $mapping = new SwatCellRendererMapping($property, $data_field);
        $this->renderers->addMappingToRenderer($renderer, $mapping);

        if ($object !== null) {
            $object->$property = $mapping;
        }

        return $mapping;
    }
public function addMappingToRenderer ( $ renderer , $ data_field , $ property , $ object = null ) { if ( $ object !== null ) { $ property = $ renderer -> getPropertyNameToMap ( $ object , $ property ) ; } $ mapping = new SwatCellRendererMapping ( $ property , $ data_field ) ; $ this -> renderers -> addMappingToRenderer ( $ renderer , $ mapping ) ; if ( $ object !== null ) { $ object -> $ property = $ mapping ; } return $ mapping ; }
Links a data-field to a cell renderer property of a cell renderer
within this container

@param SwatCellRenderer $renderer the cell renderer in this container
onto which the data-field is to be
mapped.
@param string $data_field the field of the data model to map to the cell
renderer property.
@param string $property the property of the cell renderer to which the
<i>$data_field</i> is mapped.
@param SwatUIObject $object optional. The object containing the property
to map when the property does not belong to
the cell renderer itself. If unspecified,
the <i>$property</i> must be a property of
the given cell renderer.

@return SwatCellRendererMapping a new mapping object that has been
added to the renderer.
Links a data - field to a cell renderer property of a cell renderer within this container