Get conditional styles for a cell

@param string $pCoordinate
@return PHPExcel_Style_Conditional[]
321775
public function getConditionalStyles($pCoordinate = 'A1')
    {
        if (!isset($this->_conditionalStylesCollection[$pCoordinate])) {
            $this->_conditionalStylesCollection[$pCoordinate] = array();
        }
        return $this->_conditionalStylesCollection[$pCoordinate];
    }
934536
public function getContextualChildren($position)
    {
        $widgetMapChildren = [];
        $viewWidgetMaps = $this->getContextualView()->getWidgetMapsForViewAndTemplates();

        foreach ($viewWidgetMaps as $viewWidgetMap) {
            if ($viewWidgetMap->getParent() == $this && $viewWidgetMap->getPosition() == $position) {
                $widgetMapChildren[] = $viewWidgetMap;
            }
        }

        return $widgetMapChildren;
    }
263299
protected function formatCache($cached)
    {
        $themes = is_array($cached) ? $cached : json_decode($cached, true);

        $results = [];

        foreach ($themes as $theme) {
            $results[] = new Theme($theme);
        }

        return $results;
    }
498945
public function getCellCollection($pSorted = true)
    {
        if ($pSorted) {
            // Re-order cell collection
            return $this->sortCellCollection();
        }
        if ($this->cellCollection !== null) {
            return $this->cellCollection->getCellList();
        }
        return array();
    }
765124
public function getCombinations($minContrast = 0.0)
    {
        $combinations = array();
        foreach ($this->colors as $backgroundColor) {
            foreach ($this->colors as $foregroundColor) {
                if ($backgroundColor == $foregroundColor) {
                    continue;
                }

                $contrast = $this->algorithm->calculate($foregroundColor, $backgroundColor);
                if ($contrast > $minContrast) {
                    $combinations[] = new ColorCombination($foregroundColor, $backgroundColor, $contrast);
                }
            }
        }

        return $combinations;
    }
346260
public function isDataSet($pCoord)
    {
        //    Check if the requested entry is the current object, or exists in the cache
        if (parent::isDataSet($pCoord)) {
            if ($this->currentObjectID == $pCoord) {
                return true;
            }
            //    Check if the requested entry still exists in Memcache
            $success = $this->memcache->get($this->cachePrefix.$pCoord.'.cache');
            if ($success === false) {
                //    Entry no longer exists in Memcache, so clear it from the cache array
                parent::deleteCacheData($pCoord);
                throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in MemCache');
            }
            return true;
        }
        return false;
    }
195080
public function getCacheData($pCoord)
    {
        //    Check if the entry that has been requested actually exists
        if (!isset($this->cellCache[$pCoord])) {
            $this->currentObjectID = null;
            //    Return null if requested entry doesn't exist in cache
            return null;
        }

        //    Set current entry to the requested entry
        $this->currentObjectID = $pCoord;

        //    Return requested entry
        return $this->cellCache[$pCoord];
    }
166199
public function getDataValidation($pCellCoordinate = 'A1')
    {
        // return data validation if we already have one
        if (isset($this->dataValidationCollection[$pCellCoordinate])) {
            return $this->dataValidationCollection[$pCellCoordinate];
        }

        // else create data validation
        $this->dataValidationCollection[$pCellCoordinate] = new PHPExcel_Cell_DataValidation();
        return $this->dataValidationCollection[$pCellCoordinate];
    }
1259135
public function setStartColor(PHPExcel_Style_Color $pValue = null)
    {
        // make sure parameter is a real color and not a supervisor
        $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;

        if ($this->isSupervisor) {
            $styleArray = $this->getStartColor()->getStyleArray(array('argb' => $color->getARGB()));
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
        } else {
            $this->startColor = $color;
        }
        return $this;
    }
252157
public function predefinedColors( $colorname )
    {
        $command = array();
        switch ($colorname) {
            case "green":
                $command['hue'] = 182 * 140;
                $command['sat'] = 254;
                $command['bri'] = 254;
                break;

            case "red":
                $command['hue'] = 0;
                $command['sat'] = 254;
                $command['bri'] = 254;
                break;

            case "blue":
                $command['hue'] = 182 * 250;
                $command['sat'] = 254;
                $command['bri'] = 254;
                break;

            case "coolwhite":
                $command['ct']  = 150;
                $command['bri'] = 254;
                break;

            case "warmwhite":
                $command['ct']  = 500;
                $command['bri'] = 254;
                break;

            case "orange":
                $command['hue'] = 182 * 25;
                $command['sat'] = 254;
                $command['bri'] = 254;
                break;

            case "yellow":
                $command['hue'] = 182 * 85;
                $command['sat'] = 254;
                $command['bri'] = 254;
                break;

            case "pink":
                $command['hue'] = 182 * 300;
                $command['sat'] = 254;
                $command['bri'] = 254;
                break;

            case "purple":
                $command['hue'] = 182 * 270;
                $command['sat'] = 254;
                $command['bri'] = 254;
                break;
        }

        return $command;
    }
1183060
public function getCacheData($pCoord) {
		if ($pCoord === $this->_currentObjectID) {
			return $this->_currentObject;
		}
		$this->_storeData();

		//	Check if the entry that has been requested actually exists
		if (!isset($this->_cellCache[$pCoord])) {
			//	Return null if requested entry doesn't exist in cache
			return null;
		}

		//	Set current entry to the requested entry
		$this->_currentObjectID = $pCoord;
		fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']);
		$this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz']));
        //    Re-attach this as the cell's parent
        $this->_currentObject->attach($this);

		//	Return requested entry
		return $this->_currentObject;
	}
163135
public function cellSpanBy12($position = null)
    {
        $numColumns =  $this->rowNumColumns($position);
        if (!$numColumns) {
            return null;
        }
        return ($this->cellSpan($position)*(12/$numColumns));
    }
1247395
private function getStyles(Column\AbstractColumn $col)
    {
        $styleFormatter = [];

        /*
         * First all based on value (only one works) @todo
         */
        foreach ($col->getStyles() as $style) {
            $prepend = '';
            $append = '';

            /* @var $style \ZfcDatagrid\Column\Style\AbstractStyle */
            foreach ($style->getByValues() as $rule) {
                $colString = $rule['column']->getUniqueId();
                $operator = '';
                switch ($rule['operator']) {

                    case Filter::EQUAL:
                        $operator = '==';
                        break;

                    case Filter::NOT_EQUAL:
                        $operator = '!=';
                        break;

                    default:
                        throw new \Exception('Currently not supported filter operation: "'.$rule['operator'].'"');
                        break;
                }

                $prepend = 'if (rowObject.'.$colString.' '.$operator.' \''.$rule['value'].'\') {';
                $append .= '}';
            }

            $styleString = '';
            switch (get_class($style)) {

                case 'ZfcDatagrid\Column\Style\Bold':
                    $styleString = self::STYLE_BOLD;
                    break;

                case 'ZfcDatagrid\Column\Style\Italic':
                    $styleString = self::STYLE_ITALIC;
                    break;

                case 'ZfcDatagrid\Column\Style\Strikethrough':
                    $styleString = self::STYLE_STRIKETHROUGH;
                    break;

                case 'ZfcDatagrid\Column\Style\Color':
                    $styleString = 'cellvalue = \'<span style="color: #'.$style->getRgbHexString().';">\' + cellvalue + \'</span>\';';
                    break;

                case 'ZfcDatagrid\Column\Style\CSSClass':
                    $styleString = 'cellvalue = \'<span class="'.$style->getClass().'">\' + cellvalue + \'</span>\';';
                    break;

                case 'ZfcDatagrid\Column\Style\BackgroundColor':
                    // do NOTHING! this is done by loadComplete event...
                    // At this stage jqgrid haven't created the columns...
                    break;

                case 'ZfcDatagrid\Column\Style\Html':
                    // do NOTHING! just pass the HTML!
                    break;

                case 'ZfcDatagrid\Column\Style\Align':
                    // do NOTHING! we have to add the align style in the gridcell and not in a span!
                    break;

                default:
                    throw new \Exception('Not defined style: "'.get_class($style).'"');
                    break;
            }

            $styleFormatter[] = $prepend.$styleString.$append;
        }

        return $styleFormatter;
    }
69877
public function styles($styles = []) {
		$defaults = [
			'end'    => "\033[0m",
			'black'  => "\033[0;30m",
			'red'    => "\033[0;31m",
			'green'  => "\033[0;32m",
			'yellow' => "\033[0;33m",
			'blue'   => "\033[0;34m",
			'purple' => "\033[0;35m",
			'cyan'   => "\033[0;36m",
			'white'  => "\033[0;37m",
			'heading' => "\033[1;36m",
			'option'  => "\033[0;35m",
			'command' => "\033[0;35m",
			'error'   => "\033[0;31m",
			'success' => "\033[0;32m",
			'bold'    => "\033[1m",
		];
		if ($styles === false || $this->plain || strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
			return array_combine(array_keys($defaults), array_pad([], count($defaults), null));
		}
		return $styles + $defaults;
	}
391914
public function getColumn($pColumn)
    {
        $this->testColumnInRange($pColumn);

        if (!isset($this->columns[$pColumn])) {
            $this->columns[$pColumn] = new PHPExcel_Worksheet_AutoFilter_Column($pColumn, $this);
        }

        return $this->columns[$pColumn];
    }
95063
public function setVertical($pValue = PHPExcel_Style_Alignment::VERTICAL_BOTTOM) {
		if ($pValue == '') {
			$pValue = PHPExcel_Style_Alignment::VERTICAL_BOTTOM;
		}

		if ($this->_isSupervisor) {
			$styleArray = $this->getStyleArray(array('vertical' => $pValue));
			$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
		} else {
			$this->_vertical = $pValue;
		}
		return $this;
	}
289159
public function cellRowIndex($position = null)
    {
        if ($position === null) {
            $position = $this->position();
        }
        $first = $this->rowFirstCellIndex($position);

        return ($position - $first);
    }