芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/giga.mgaplay.com.br/vendor/xibosignage/oauth2-xibo-cms/src/Entity/XiboDataSetRow.php
. */ namespace Xibo\OAuth2\Client\Entity; use Xibo\OAuth2\Client\Exception\XiboApiException; class XiboDataSetRow extends XiboEntity { private $url = '/dataset'; /** @var int The ID of the DataSet that this row belongs to */ public $dataSetId; /** @var int The ID of the DataSet column that this row belongs to */ public $dataSetColumnId; /** @var int The ID of the DataSet row */ public $rowId; /** * Get a data for the specified dataSetId. * * @param int $dataSetId The DataSetId * @return XiboDataSetRow */ public function get($dataSetId) { $this->dataSetId = $dataSetId; $this->getLogger()->info('Getting row data from dataSet ID ' . $dataSetId); $response = $this->doGet('/dataset/data/'. $this->dataSetId); return $response; } /** * Create Row. * * @param string $rowData The data to add to the specified column * @param int $dataSetId The DataSetId * @param int $columnId The dataSetColumnId * @return XiboDataSetRow */ public function create($dataSetId, $columnId, $rowData) { $this->dataSetId = $dataSetId; $this->userId = $this->getEntityProvider()->getMe()->getId(); $this->getLogger()->info('Creating row in dataSet ID ' . $dataSetId . ' Column ID ' . $columnId); $response = $this->doPost('/dataset/data/'. $dataSetId, [ 'dataSetColumnId_' . $columnId => $rowData ]); return $response; } /** * Edit Row. * * @param string $rowData The data to edit to the specified column * @param int $dataSetId The DataSetId * @param int $columnId The dataSetColumnId * @return XiboDataSetRow */ public function edit($dataSetId, $columnId, $rowData) { $this->dataSetId = $dataSetId; $this->userId = $this->getEntityProvider()->getMe()->getId(); $this->getLogger()->info('Editing row ID' . $this->rowId . ' In dataSet ID ' . $dataSetId . ' Column ID' . $columnId); $response = $this->doPut('/dataset/data/'. $this->dataSetId . $this->rowId, [ 'dataSetColumnId_' . $columnId => $rowData ]); return $response; } /** * Delete Row. * * @return bool */ public function delete() { $this->getLogger()->info('Deleting row ID ' . $this->rowId . ' From dataSet ID ' . $this->dataSetId); $this->doDelete('/dataset/data/' . $this->dataSetId . $this->rowId); return true; } }