Created
March 3, 2016 11:53
-
-
Save asika32764/a0f865dd82ebc250578d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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