Skip to content

Instantly share code, notes, and snippets.

@asika32764
Created March 3, 2016 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asika32764/a0f865dd82ebc250578d to your computer and use it in GitHub Desktop.
Save asika32764/a0f865dd82ebc250578d to your computer and use it in GitHub Desktop.
<?php
// components/com_flower/model/sakura.php
// Model
class FlowerModelSakura extends \Windwalker\Model\CrudModel
{
// CrudModel will auto getForm()
}
// Then add components/com_flower/model/form/sakura.xml
// The form will auto include
// And you can get form in view
class FlowerViewSakuraHtml extends EditView
{
public function prepareData()
{
$data = $this->getData();
$data->form = $this->get('Form');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment