_id = $id; $this->_cellProvider = $cellProvider; $this->_flags = $flags; } // // Setters/Getters // /** * Get the element id * * @return string */ public function getId() { return $this->_id; } /** * Set the element id * * @param string $id */ public function setId($id) { $this->_id = $id; } /** * Get all layout flags * * @return array */ public function getFlags() { return $this->_flags; } /** * Get a single layout flag * * @param string $flag */ public function getFlag($flag) { assert(isset($this->_flags[$flag])); return $this->_flags[$flag]; } /** * Check whether a layout flag is set to true. * * @param string $flag * * @return bool */ public function hasFlag($flag) { if (!isset($this->_flags[$flag])) { return false; } return (bool)$this->_flags[$flag]; } /** * Add a layout flag * * @param string $flag * @param mixed $value optional */ public function addFlag($flag, $value = true) { $this->_flags[$flag] = $value; } /** * Get the cell provider * * @return GridCellProvider */ public function getCellProvider() { return $this->_cellProvider; } /** * Set the cell provider * * @param GridCellProvider $cellProvider */ public function setCellProvider($cellProvider) { $this->_cellProvider = $cellProvider; } } if (!PKP_STRICT_MODE) { class_alias('\PKP\controllers\grid\GridBodyElement', '\GridBodyElement'); }