A lien is created: \1. By contract of the parties; or, \2. By operation of law. Source: Enacted 1872. Previous sectionCalifornia Civil Code § 2877 Next sectionCalifornia Civil Code § 2882