Passing page arguments to custom block inside panel I have created a page(Page Manager) in drupal 8 with a path say /dashboard/{nodeid}. Inside that I have created a Panel and inside panel I have added a Custom Block ( which I created programmatically by extending BlockBase).
Now my problem is I want to use the {nodeid} inside my buildForm function. 

Please suggest me.

My code is as follows.

ABCBlock.php

class ABCBlock extends BlockBase
{

    public function build() {  

        return \Drupal::formBuilder()-&gt;getForm('Drupal\examples\Form\ABCForm');

    }


}


ABCForm.php

class ABCForm extends FormBase
{

    public function getFormId() {
      return 'example_ABCForm';     
    }



    public function buildForm(array $form, FormStateInterface $form_state)    {

      drupal_set_message('Hello World.'); // displaying fine.
      $tmp = arg(0);//or arg(1) which i am assuming as url parameter value. But it FAILS.

      //load node object using $tmp

    }

}
While a very different question, the answer is the same as mine in https://drupal.stackexchange.com/a/188629/31.

In short, define a context on your block, make sure that the parameter in page manager is defined as type node and the rest should just work.