私は自分のモデルに次のような関数を作成します:
public function getAllMenuByOnlyActionPage($actionlot){
$act = trim($actionlot);
$result = $this->tableGateway->select(function (Select $select) {
$select->where(array('status != ?' => 13))
->where(array('action' => $act))
->order('id ASC');
});
$results = array();
foreach ($result as $row) {
$results[] = $row;
}
return $results;
}
実行しようとすると、それが表示されますNotice: Undefined variable: act
。このリンクZF2 tableGateway selectは既に表示されていますが、この関数のパラメーターを設定したいです。ありがとう