How I can use $I in ClientCrudPage extends BasePage

How I can use $I in ClientCrudPage extends BasePage?


$I->click('schedule_pending');

Here is my code:




<?php


namespace tests\codeception\frontend\_pages;


use \yii\codeception\BasePage;


/**

 * Represents client page

 * @property \codeception_frontend\AcceptanceTester|\codeception_frontend\FunctionalTester $actor

 */

class ClientCrudPage extends BasePage

{


    public $route = 'clients/create';


    /**

     * @param array $signupData

     */

    public function submit(array $signupData)

    {

        foreach ($signupData as $field => $value) {

            $inputType = $field === 'body' ? 'textarea' : 'input';

            $this->actor->fillField($inputType . '[name="Clients[' . $field . ']"]', $value);

        }

        

        //$this->actor->click('schedule_pending');

         $I->click('schedule_pending');

    }

}



I got this error: