/** * Returns the final string representing the content of the cell. * * @param mixed $item * @return string */ public function FetchCellValue($item) { $strText = parent::FetchCellValue($item); // allow post processing of cell label $getVars = null; if ($this->getVars) { if (is_array($this->getVars)) { if (array_keys($this->getVars)[0] === 0) { // assume this is not associative array. Likely we are here to extract a property list. $getVars = static::GetObjectValue($this->getVars, $item); } else { // associative array, so likely these are Get variables to be assigned individually foreach ($this->getVars as $key => $val) { $getVars[$key] = static::GetObjectValue($val, $item); } } } elseif ($this->getVars instanceof QQNode) { $getVars = static::GetObjectValue($this->getVars, $item); } else { $getVars = $this->getVars; // could be a simple action parameter. } } $tagAttributes = []; if ($this->tagAttributes && is_array($this->tagAttributes)) { foreach ($this->tagAttributes as $key => $val) { $tagAttributes[$key] = static::GetObjectValue($val, $item); } } if ($this->mixDestination === null) { return QApplication::HtmlEntities($strText); } elseif ($this->mixDestination instanceof QControlProxy) { if ($this->blnAsButton) { return $this->mixDestination->RenderAsButton($strText, $getVars, $tagAttributes); } else { return $this->mixDestination->RenderAsLink($strText, $getVars, $tagAttributes); } } else { $strDestination = static::GetObjectValue($this->mixDestination, $item); return QHtml::RenderLink(QHtml::MakeUrl($strDestination, $getVars), $strText, $tagAttributes); } }